Skip to content

Fix to reset the forceUpdate flag after the update - #11440

Merged
gaearon merged 2 commits into
react:masterfrom
koba04:fix-shallow-renderer-forceupdate
Nov 3, 2017
Merged

Fix to reset the forceUpdate flag after the update#11440
gaearon merged 2 commits into
react:masterfrom
koba04:fix-shallow-renderer-forceupdate

Conversation

@koba04

@koba04 koba04 commented Nov 3, 2017

Copy link
Copy Markdown
Contributor

This is a PR to follow up #11439.
Currently, _forcedUpdate flag is never reset until shouldComponentUpdate returns false so A test in this PR doesn't pass.

This is a PR to fix this.
I think the flag can be reset after the render.

@koba04

koba04 commented Nov 3, 2017

Copy link
Copy Markdown
Contributor Author

I should have commented this to the PR.
But I couldn't make it before it's merged💨

@gaearon

gaearon commented Nov 3, 2017

Copy link
Copy Markdown
Contributor

Thanks for catching this. I decided to restructure the code a bit to better match how we do it in the real reconciler. Also added support for PureComponent while I’m there.

@gaearon
gaearon merged commit e8a3823 into react:master Nov 3, 2017
@koba04

koba04 commented Nov 3, 2017

Copy link
Copy Markdown
Contributor Author

Thanks! 👏 I forgot about PureComponent! 😅

@koba04
koba04 deleted the fix-shallow-renderer-forceupdate branch November 3, 2017 16:00
Ethan-Arrowood pushed a commit to Ethan-Arrowood/react that referenced this pull request Dec 8, 2017
* Fix to reset the forceUpdate flag after the update

* Add support for PureComponent and mirror real behavior closer
NMinhNguyen referenced this pull request in enzymejs/react-shallow-renderer Jan 29, 2020
* Fix to reset the forceUpdate flag after the update

* Add support for PureComponent and mirror real behavior closer
mrizwanashiq pushed a commit to mrizwanashiq/react that referenced this pull request Jun 25, 2026
* Fix to reset the forceUpdate flag after the update

* Add support for PureComponent and mirror real behavior closer
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