Created
April 22, 2024 21:11
-
-
Save PaulieScanlon/3efa670694fb186eaf147afcdfa4ea2d to your computer and use it in GitHub Desktop.
Example of state diff
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// src/state/index.ts | |
import { atom } from 'jotai'; | |
export const countAtom = atom(0); | |
export const objectAtom = atom({ | |
foo: 'bar', | |
test: true, | |
}); | |
+ export const userAtom = atom({ | |
+ isLoggedIn: false, | |
+ isAdmin: false, | |
+ }); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment