yoast-components
yoast-components copied to clipboard
Replace `componentWillMount` & `componentWillReceiveProps`
When SCRIPT_DEBUG
is enabled, the development version of React is loaded in Gutenberg. This shows a lot of warnings about these two functions being deprecated
Replace with:
- componentDidMount
- static getDerivedStateFromProps
Add define( 'SCRIPT_DEBUG', true );
to your wp-config.php
to see these warnings.