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
Imagine we had
const [get, getCallback] = useRecoil();
where get and getCallback have the same semantics as in the getter of selector.
get
getCallback
selector
Then I could write:
function Foo() { const [get, getCallback] = useRecoil(); return <>{get(myAtom)} <button onClick={() => getCallback(({i}) => i.set(myAtom, 42))}>42</button></> }
The text was updated successfully, but these errors were encountered:
what was the motivation behind this?
Sorry, something went wrong.
The motivation is to avoid value/state-hooks for every piece the component is using.
No branches or pull requests
Imagine we had
where
get
andgetCallback
have the same semantics as in theget
ter ofselector
.Then I could write:
The text was updated successfully, but these errors were encountered: