【React】reactのcomponentWillMount React Posted by: 2021年2月9日 no comments yet <スポンサーリンク> componentWillMount() componentが呼び出される直前に実行される setstateを呼び出すとstateに値が入った状態で画面描画される componentWillMount(){ const request = axios.create({ baseURL: 'http://localhost:8080' }) request.get('/describe') .then(res => { this.setState({ userDatas: res.data }); }) } <スポンサーリンク> older newer コメントを残す コメントをキャンセルAllowed tags: you may use these HTML tags and attributes: <a href="">, <strong>, <em>, <h1>, <h2>, <h3>Please note: all comments go through moderation. Name (required) Email (required) Website キャプチャコード * Δemail confirm* post date* 日本語が含まれない投稿は無視されますのでご注意ください。(スパム対策)