This repository was archived by the owner on Jan 1, 2025. It is now read-only.
Can I export atom definition #1170
Unanswered
kevinli-webbertech
asked this question in
Q&A
Replies: 1 comment
-
|
answer myself, I find some example in the git repo, |
Beta Was this translation helpful? Give feedback.
0 replies
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.
-
can I export this and import from another file? For example put the following state in a dedicated file.
import {atom} from 'recoil';
const ComponentsState = atom({
key: 'componentsState', // unique ID (with respect to other atoms/selectors)
default: [], // default value (aka initial value)
});
export {ComponentsState}
Beta Was this translation helpful? Give feedback.
All reactions