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

Fix deprecated componentWillReceiveProps lifecycle method usage in ResizableBox component #16950

Closed
nerrad opened this issue Aug 7, 2019 · 0 comments · Fixed by #17011
Closed
Assignees
Labels
[Package] Components /packages/components [Type] Bug An existing feature does not function as intended

Comments

@nerrad
Copy link
Contributor

nerrad commented Aug 7, 2019

Describe the bug
The ResizableBox component in @wordpress/components is throwing a React Strict warning when it is implemented:

Console Error Warning: Unsafe lifecycle methods were found within a strict-mode tree: in StrictMode (created by Editor) in Editor in Unknown (created by WithSelect(Editor)) in WithSelect(Editor)

componentWillReceiveProps: Please update the following components to use static getDerivedStateFromProps instead: Resizable

I traced the warning all the way to the implementation of the re-resizable package:

https://github.com/bokuweb/re-resizable/blob/7ea154470567735149d5e3827cc9fb856f8e8f68/src/index.tsx#L463-L465

Unfortunately, this package does not have a newer release fixing the issue (GB is using the latest version), so I've opened an issue in their repository: bokuweb/re-resizable#504. There's some uncertainty on how active that package is so we'll have to see what happens.

@nerrad nerrad added [Package] Components /packages/components [Type] Bug An existing feature does not function as intended labels Aug 7, 2019
@github-actions github-actions bot added the [Status] In Progress Tracking issues with work in progress label Aug 12, 2019
@nerrad nerrad removed the [Status] In Progress Tracking issues with work in progress label Aug 13, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Package] Components /packages/components [Type] Bug An existing feature does not function as intended
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants