We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Do you want to request a feature or report a bug? Feature
What is the current behavior? useContext triggers update if the whole passed store changed
What is the expected behavior? add keys argument to trigger update only if specified keys in passed store changed
It would be useful to improve application speed.
F.e.
function MyComponent() { // example context value // I want to ignore age changes (who does't hehe) // { // name: 'Max', // age: 35 // } // dep's-like style const {name} = useContext(MyContext, 'name') // or // comparator style const {name} = useContext(MyContext, (current, old) => current.name !== old.name) }
The text was updated successfully, but these errors were encountered:
Duplicate of #14110
Sorry, something went wrong.
@vkurchatkin ty
No branches or pull requests
Do you want to request a feature or report a bug?
Feature
What is the current behavior?
useContext triggers update if the whole passed store changed
What is the expected behavior?
add keys argument to trigger update only if specified keys in passed store changed
It would be useful to improve application speed.
F.e.
The text was updated successfully, but these errors were encountered: