react-datepicker2
react-datepicker2 copied to clipboard
Legacy context API warning
Calendar component triggers this two warnings in React 17.x releases :
First warning
Warning: Legacy context API has been detected within a strict-mode tree. The old API will be supported in all 16.x releases, but applications using it should migrate to the new version.
Please update the following components: Calendar, Heading
Second warning
Warning: Using UNSAFE_componentWillReceiveProps
in strict mode is not recommended and may indicate bugs in your code. See https://reactjs.org/link/unsafe-component-lifecycles for details.
- Move data fetching code or side effects to
componentDidUpdate
. - 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://reactjs.org/link/derived-state
Please update the following components: Calendar