From cd67e40478bc31a8acaa9c4843f64855467717b9 Mon Sep 17 00:00:00 2001 From: daishi Date: Wed, 9 Oct 2024 08:02:46 +0900 Subject: [PATCH] wip: remove force flag --- src/vanilla/store.ts | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/vanilla/store.ts b/src/vanilla/store.ts index f8528ac282..87bc95dd51 100644 --- a/src/vanilla/store.ts +++ b/src/vanilla/store.ts @@ -289,10 +289,9 @@ const buildStore = (getAtomState: StoreArgs[0]): Store => { atom: Atom, atomState: AtomState, dirtyAtoms?: Set, - force?: boolean, ): AtomState => { // See if we can skip recomputing this atom. - if (!force && isAtomStateInitialized(atomState)) { + if (isAtomStateInitialized(atomState)) { // If the atom is mounted, we can use the cache. // because it should have been updated by dependencies. if (atomState.m && !dirtyAtoms?.has(atom)) { @@ -471,7 +470,7 @@ const buildStore = (getAtomState: StoreArgs[0]): Store => { } } if (hasChangedDeps) { - readAtomState(pending, a, aState, markedAtoms, true) + readAtomState(pending, a, aState, markedAtoms) mountDependencies(pending, a, aState) if (prevEpochNumber !== aState.n) { addPendingAtom(pending, a, aState)