Skip to content

Commit 3de5d1e

Browse files
koba04lightnet328
andcommitted
Update content/docs/reference-react-component.md
Co-Authored-By: lightnet328 <[email protected]>
1 parent cf425a7 commit 3de5d1e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

content/docs/reference-react-component.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -432,7 +432,7 @@ UNSAFE_componentWillMount()
432432
>
433433
> このライフサイクルは、以前は `componentWillMount` という名前でした。その名前はバージョン 17 まで機能し続けます。コンポーネントを自動的に更新するには、[`rename-unsafe-lifecycles` codemod](https://github.com/reactjs/react-codemod#rename-unsafe-lifecycles) を使用してください。
434434
435-
マウントが行われる直前に `UNSAFE_componentWillMount()` が呼び出されます。これは `render()` の前に呼び出されるので、このメソッドで `setState()` を同期的に呼び出しても余分なレンダーは行われません。一般に、state を初期化するために代わりに `constructor()` を使うことをおすすめします。
435+
マウントが行われる直前に `UNSAFE_componentWillMount()` が呼び出されます。これは `render()` の前に呼び出されるので、このメソッドで `setState()` を同期的に呼び出しても余分なレンダーは行われません。一般に、state を初期化するためには代わりに `constructor()` を使うことをおすすめします。
436436

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

0 commit comments

Comments
 (0)