Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Resolve strict React errors in combination with Gutenberg #10494

Open
moorscode opened this issue Aug 2, 2018 · 2 comments
Open

Resolve strict React errors in combination with Gutenberg #10494

moorscode opened this issue Aug 2, 2018 · 2 comments

Comments

@moorscode
Copy link
Contributor

Because React has deprecated Life-cycle methods and Gutenberg has Strict-mode enabled, we receive a lot of warnings when building for development environments.

These should be fixed.

Warning: Unsafe lifecycle methods were found within a strict-mode tree:
    in Unknown (created by e)
    in e (created by RemountOnPropChange(e))
    in RemountOnPropChange(e)
    in WithSelect(Component)

componentWillMount: Please update the following components to use componentDidMount instead: SvgIcon__StyledSvg

componentWillReceiveProps: Please update the following components to use static getDerivedStateFromProps instead: Connect(LocalizedComponent), SvgIcon__StyledSvg

componentWillUpdate: Please update the following components to use componentDidUpdate instead: Connect(LocalizedComponent)

Learn more about this warning here:
https://fb.me/react-strict-mode-warnings
@IreneStr
Copy link
Contributor

Updating styled components to 4.0 should fix this.

@IreneStr
Copy link
Contributor

IreneStr commented Feb 14, 2019

This might be fixed in the styled components update in Yoast/yoast-components#825 and/or #12209

Make sure to have define( 'SCRIPT_DEBUG', true ); in your wp-config.php when testing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants