Skip to content

Instantly share code, notes, and snippets.

@PaulieScanlon
Last active April 22, 2024 21:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save PaulieScanlon/e482515597d6ac9c2fabbcf4dbfe32e4 to your computer and use it in GitHub Desktop.
Save PaulieScanlon/e482515597d6ac9c2fabbcf4dbfe32e4 to your computer and use it in GitHub Desktop.
Example of state diff
// src/state/index.ts
import { atom } from 'jotai';
export const countAtom = atom(0);
+ export const objectAtom = atom({
+ foo: 'bar',
+ test: true,
+ });
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment