gaearon / react-deep-force-update

Force-updates React component tree recursively
MIT License
122 stars 19 forks source link

React fiber compatibility #5

Closed rafeca closed 7 years ago

rafeca commented 7 years ago

This PR adds compatibility to the new React Fiber data structure. This fixes hot module reloading in React Native for React v16.

I've done the change in the 1.x branch, since this is the one used by the react-proxy module, which is used for HMR, but a very similar PR can be done for v2.

The tests haven't been changed, to ensure the backwards compatibility, but I have a commit which updates React to v16 to prove that this works on React Fiber (https://github.com/rafeca/react-deep-force-update/commit/2eb66a933781fa6025fc7c19523c3a565dff1db2).

Ideally we should have tests for different versions of React, but this is out of scope of this PR :)

rafeca commented 7 years ago

@gaearon I've had to update a few dependencies in order to get the build passing:

gaearon commented 7 years ago

Thanks!

gaearon commented 7 years ago

All released. Thank again!