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.
When
SCRIPT_DEBUGis enabled, the development version of React is loaded in Gutenberg. This shows a lot of warnings about these two functions being deprecatedReplace with:
Add
define( 'SCRIPT_DEBUG', true );to yourwp-config.phpto see these warnings.