From c9f79ee73f58fbaadc64d337631aef7791aeb93a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Eyy=C3=BCp=20Sincar?= <62295171+eyupsincar@users.noreply.github.com> Date: Tue, 28 Dec 2021 12:09:33 +0300 Subject: [PATCH] Rename componentWillReceiveProps to UNSAFE_componentWillReceiveProps 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. Please update the following components: %s, DatePicker --- datepicker.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/datepicker.js b/datepicker.js index ac6cacde29..b69d9b40a7 100644 --- a/datepicker.js +++ b/datepicker.js @@ -50,7 +50,7 @@ class DatePicker extends Component { this.setModalVisible = this.setModalVisible.bind(this); } - componentWillReceiveProps(nextProps) { + UNSAFE_componentWillReceiveProps(nextProps) { if (nextProps.date !== this.props.date) { this.setState({date: this.getDate(nextProps.date)}); }