While styling a dcc.DatePickerSingle component, I noticed the following warning in the browser’s console:
Warning: componentWillReceiveProps has been renamed, and is not recommended for use. See https://fb.me/react-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://fb.me/react-derived-state
- 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-lifecyclesin your project source folder.
Please update the following components: n
I got dash 2.13.0 and dash-core-components 2.0.0 running. Below is the 'Minimal Working example:
from dash import Dash, dcc, html app = Dash(__name__) app.layout = html.Div( dcc.DatePickerSingle() ) if __name__ == '__main__': app.run_server(debug=True)
Note: this warning is also thrown for the dcc.DatePickerRange.
Please let me know whether this has some potential security implications and if it should be updated.