Recoil
Get Started
npm install recoilIntroduction
Atom
import {
RecoilRoot,
atom,
selector
} from 'recoil';
const textState = atom({
key: 'textState', // unique ID (with respect to other atoms/selectors)
default: 'test', // default value (aka initial value)
});
function App() {
return (
<RecoilRoot>
<TextInput textState={textState}/>
</RecoilRoot>
);
Selector
Data Fetching
Reference
Last updated
