Skip to content

Commit

Permalink
Update content/docs/reference-react-component.md
Browse files Browse the repository at this point in the history
Co-Authored-By: lightnet328 <lightnet328@gmail.com>
  • Loading branch information
koba04 and lightnet328 committed Feb 22, 2019
1 parent 27e7db7 commit 80d8236
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion content/docs/reference-react-component.md
Original file line number Diff line number Diff line change
Expand Up @@ -434,7 +434,7 @@ UNSAFE_componentWillMount()
>
> このライフサイクルは、以前は `componentWillMount` という名前でした。その名前はバージョン 17 まで機能し続けます。コンポーネントを自動的に更新するには、[`rename-unsafe-lifecycles` codemod](https://github.com/reactjs/react-codemod#rename-unsafe-lifecycles) を使用してください。
マウントが行われる直前に `UNSAFE_componentWillMount()` が呼び出されます。これは `render()` の前に呼び出されるので、このメソッドで `setState()` を同期的に呼び出しても余分なレンダーは行われません。一般に、state を初期化するために代わりに `constructor()` を使うことをおすすめします。
マウントが行われる直前に `UNSAFE_componentWillMount()` が呼び出されます。これは `render()` の前に呼び出されるので、このメソッドで `setState()` を同期的に呼び出しても余分なレンダーは行われません。一般に、state を初期化するためには代わりに `constructor()` を使うことをおすすめします。

このメソッドでは、副作用や購読を導入しないでください。そのような場合は、代わりに `componentDidMount()` を使用してください。

Expand Down

0 comments on commit 80d8236

Please sign in to comment.