Shallow renderer: support multiple setState invocation#11167
Merged
gaearon merged 1 commit intofacebook:masterfrom Oct 10, 2017
JetBrains:fix-shallow-setstate
Merged
Shallow renderer: support multiple setState invocation#11167gaearon merged 1 commit intofacebook:masterfrom JetBrains:fix-shallow-setstate
setState invocation#11167gaearon merged 1 commit intofacebook:masterfrom
JetBrains:fix-shallow-setstate
Conversation
Collaborator
|
cc @bvaughn who I believe originally wrote it. Looks good to you? |
bvaughn
approved these changes
Oct 9, 2017
Contributor
bvaughn
left a comment
There was a problem hiding this comment.
It's been a while since I've thought about this component too closely 😁 but this change looks good to me. I appreciate the newly-added tests.
Collaborator
|
@Hypnosphi Could you please also get a local clone of Enzyme running and verify that patching this up in |
Contributor
Author
|
I did: # in react directory
yarn build
cd build/packages/react-test-renderer
yarn link
cd ../../../.. # parent of react directory
git clone https://github.com/airbnb/enzyme.git
cd enzyme
yarn
yarn react:16
yarn link react-test-renderer
yarn test:onlyAnd it passes |
Collaborator
|
Sweet. Thanks. |
This was referenced Oct 10, 2017
This was referenced Nov 9, 2017
Update react in packages/oc-template-react from 16.0.0 to 16.1.0
opencomponents/oc-template-react#48
Closed
This was referenced Feb 2, 2018
This was referenced Feb 2, 2018
This was referenced Mar 1, 2018
This was referenced Mar 21, 2018
This was referenced Aug 7, 2020
This was referenced Sep 27, 2021
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Issue: #11161
This PR ensures that subsequent calls to
setState:setStateas base state when shallow merging