Custom equality check configuration for custom hooks #83
exoRift
started this conversation in
Feature Requests
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Let's face it. Not every hook follows the rule of hooks to a T.
Something that should be available is a way to define a custom equality check for the output of a custom hook. That way, when React Compiler inserts a
React.memo, custom logic can be applied as to whether the value should recompute or not so that these hooks can function without opting the entire component out of memo with'use no memo'.Beta Was this translation helpful? Give feedback.
All reactions