Skip to content

Commit

Permalink
refactor(core): follow naming convention (#2662)
Browse files Browse the repository at this point in the history
  • Loading branch information
dai-shi authored Jul 16, 2024
1 parent 904cb39 commit ba9e8fe
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions src/vanilla/store.ts
Original file line number Diff line number Diff line change
Expand Up @@ -697,13 +697,13 @@ export const createStore = (): Store => {
const pending = createPending()
for (const [atom, value] of values) {
if (hasInitialValue(atom)) {
const aState = getAtomState(atom)
const hasPrevValue = 'v' in aState
const prevValue = aState.v
setAtomStateValueOrPromise(atom, aState, value)
mountDependencies(pending, atom, aState)
if (!hasPrevValue || !Object.is(prevValue, aState.v)) {
addPendingAtom(pending, atom, aState)
const atomState = getAtomState(atom)
const hasPrevValue = 'v' in atomState
const prevValue = atomState.v
setAtomStateValueOrPromise(atom, atomState, value)
mountDependencies(pending, atom, atomState)
if (!hasPrevValue || !Object.is(prevValue, atomState.v)) {
addPendingAtom(pending, atom, atomState)
recomputeDependents(pending, atom)
}
}
Expand Down

0 comments on commit ba9e8fe

Please sign in to comment.