Address Warning that ImageEdit is Using Deprecated componentWillReceiveProps #1228
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Related gutenberg PR
Summary
This fixes one of the warnings that we now see when running the demo app because of the use of the deprecated
componentWillReceiveProps
component lifecycle method.On launching the app, you will still see the warning for use of the deprecated
componentWillReceiveProps
method, but now there should be only 1 warning instead of 2 😃 (addressing the other warning is a bit less straightforward, so I wanted to just keep this PR very small and focused).Testing
First, check the warnings on loading the demo app and confirm that there is no longer the warning for
ImageEdit
.Second, verify that the new static method is still addressing the UI flicker that the initial method was added to fix. As noted in the original PR adding this method, this state update was added to avoid a UI flicker in the format bar when switching away from an image caption where the toolbar buttons for both the caption and the newly-selected block were shown at the same time.
Update release notes:
No updates made to release notes because there are no user-facing changes.