Files
react/packages
Dan Abramov 8d60bd4dc2 [Shallow] Implement setState for Hooks and remount on type change (#15120)
* Throw away old shallow renderer state on type change

This worked in function components but was broken for classes. It incorrectly retained the old instance even if the type was different.

* Remove _previousComponentIdentity

We only needed this because we didn't correctly reset based on type. Now we do so this can go away.

* Use _reset when unmounting

* Use arbitrary componentIdentity

There was no particular reason it was set to element.type. We just wanted to check if something is a render phase update.

* Support Hook state updates in shallow renderer
2019-03-15 22:30:32 +00:00
..
2019-03-05 15:17:42 -08:00
2019-03-05 15:17:42 -08:00
2019-03-05 15:17:42 -08:00
2019-03-05 15:17:42 -08:00