Skip to content

Replace componentWillMount & componentWillReceiveProps #791

Description

@moorscode

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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions