Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Implement the experimental Hooks proposal behind a feature flag #13968
Hooks let you use all React features (such as state and lifecycle) without writing a class.
We have presented the Hooks proposal at React Conf 2018. This pull request implements all proposed built-in Hooks behind a feature flag, both for the client and the server renderer.
This is a very early time for Hooks and this proposal is experimental. We're merging it into master now so we can iterate on it. It is turned on only in the 16.7 alpha release so that you can try it and provide your feedback.
We have been using this code for a month in production so while the APIs are not stable, we don't expect the implementation to contain major bugs.
Please keep the feedback and discussion contained in the Hooks RFC (and not in this PR) so that everyone can discuss it in a single place without checking multiple GitHub threads.
Details of bundled changes.
referenced this pull request
Oct 26, 2018
What was the reason this uses the dynamic switch? It is always preferable to use the static one.