質問編集履歴
1
エラーメッセージの追記
title
CHANGED
File without changes
|
body
CHANGED
@@ -2,7 +2,16 @@
|
|
2
2
|
画像の通りエラーがでておりまして,内容は
|
3
3
|
componentWillReceivePropsは非推奨だから名前を変えてください。と書いてます。
|
4
4
|

|
5
|
+
```ErrorMessage
|
6
|
+
react-dom.development.js:88 Warning: componentWillReceiveProps has been renamed, and is not recommended for use. See https://fb.me/react-unsafe-component-lifecycles for details.
|
5
7
|
|
8
|
+
* Move data fetching code or side effects to componentDidUpdate.
|
9
|
+
* If you're updating state whenever props change, refactor your code to use memoization techniques or move it to static getDerivedStateFromProps. Learn more at: https://fb.me/react-derived-state
|
10
|
+
* Rename componentWillReceiveProps to UNSAFE_componentWillReceiveProps to suppress this warning in non-strict mode. In React 17.x, only the UNSAFE_ name will work. To rename all deprecated lifecycles to their new names, you can run `npx react-codemod rename-unsafe-lifecycles` in your project source folder.
|
11
|
+
|
12
|
+
Please update the following components: DateInput
|
13
|
+
```
|
14
|
+
|
6
15
|
こちらの対策としまして、[React公式ドキュメント](https://ja.reactjs.org/blog/2019/08/08/react-v16.9.0.html)より
|
7
16
|
> npx react-codemod rename-unsafe-lifecycles
|
8
17
|
|