[Fizz] Implement Hooks #21257
Merged
[Fizz] Implement Hooks #21257
+555
−56
Conversation
|
Comparing: a597c2f...7daeca3 Critical size changesIncludes critical production bundles, as well as any change greater than 2%:
Significant size changesIncludes any change greater than 0.2%: Expand to show
|
This was referenced Apr 14, 2021
This is pretty much just a copy of the partial renderer Hooks.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Builds on top of #21255.
This is basically just a copy-paste of ReactPartialRendererHooks. I also implemented forwardRef which also uses renderWithHooks (and useMemo). It doesn't include useOpaqueIdentifier yet.
The memo and multi-pass render semantics are very unfortunate. We probably should do something about that sooner rather than later. Maybe by adding more error states to DEV mode and maybe finding ways to detect special cases and running additional render passes only during those.