Replies: 1 comment 3 replies
-
You need another atom to make it writable. const baseAsyncAtom = atomWithStorage(...)
const readOnlyLoadableAtom = loadable(baseAsyncAtom)
export const writableLoadableAtom = atom(
(get) => get(readOnlyLoadableAtom),
(_get, set, arg) => set(baseAsyncAtom, arg)
) |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
What I am trying to do here is to keep some flags for my react native app and set it true and false depending on some conditions.
Here is my code
How do i make userProfile atom writable and use it with### immer? So that I can change the flags and persist them.
Beta Was this translation helpful? Give feedback.
All reactions