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 bug in cloneHook #14364

Merged
merged 2 commits into from
Nov 30, 2018
Merged

Fix bug in cloneHook #14364

merged 2 commits into from
Nov 30, 2018

Conversation

ioss
Copy link
Contributor

@ioss ioss commented Nov 30, 2018

Fixes #14360 and adds a test for mixed priority dispatches.

It was broken because cloneHook assigned memoizedState instead of
baseState from the original hook to baseState of the clone.

It was broken because `cloneHook` assigned `memoizedState` instead of
`baseState` from the original hook to `baseState` of the clone.
Copy link
Collaborator

@gaearon gaearon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks legit. Thanks for the fix and the regression test.

@gaearon gaearon merged commit f1bf281 into facebook:master Nov 30, 2018
jetoneza pushed a commit to jetoneza/react that referenced this pull request Jan 23, 2019
* Fixes facebook#14360 and adds a test for mixed priority dispatches.

It was broken because `cloneHook` assigned `memoizedState` instead of
`baseState` from the original hook to `baseState` of the clone.

* tweak comments
n8schloss pushed a commit to n8schloss/react that referenced this pull request Jan 31, 2019
* Fixes facebook#14360 and adds a test for mixed priority dispatches.

It was broken because `cloneHook` assigned `memoizedState` instead of
`baseState` from the original hook to `baseState` of the clone.

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

Successfully merging this pull request may close these issues.

3 participants