Skip to content

Instantly share code, notes, and snippets.

View probeiuscorp's full-sized avatar

Caleb Stimpson probeiuscorp

  • UTC-5
View GitHub Profile
readAtomState force: undefined atomState: undefined
- readAtomState (store.ts:382:9)
- mountAtom (store.ts:637:5)
- addAtom (store.ts:499:17)
- Object.subscribeAtom (store.ts:778:21)
- <anonymous> (test.ts:27:7)
- Object.<anonymous> (test.ts:35:63)
<= not from cache: resolving dependencies
=> (should be "no-filter") no-filter
readAtomState force: true atomState: {
@probeiuscorp
probeiuscorp / store.ts
Last active May 15, 2024 18:05
Files and changes I made to gather data for https://github.com/pmndrs/jotai/pull/2534
let n = 0 // Line 400
const readAtomState = <Value>(
atom: Atom<Value>,
force?: boolean,
): AtomState<Value> => {
// See if we can skip recomputing this atom.
const atomState = getAtomState(atom)
const isInteresting = atom.debugLabel === 'filteredAtom'
const log = (...args) => isInteresting && console.log(...args)
if (isInteresting) {