diff --git a/src/core/vanilla.ts b/src/core/vanilla.ts index e52640c558..ed4f4bad24 100644 --- a/src/core/vanilla.ts +++ b/src/core/vanilla.ts @@ -193,7 +193,6 @@ const scheduleReadAtomState = ( ): void => { promise.then(() => { readAtomState(state, atom, true) - flushPending(state) }) } diff --git a/tests/async.test.tsx b/tests/async.test.tsx index 3e845ae85d..28d5455d26 100644 --- a/tests/async.test.tsx +++ b/tests/async.test.tsx @@ -572,4 +572,8 @@ it('a derived atom from a newly created async atom (#351)', async () => { fireEvent.click(getByText('button')) await findByText('loading') await findByText('derived: 12, commits: 2') + + fireEvent.click(getByText('button')) + await findByText('loading') + await findByText('derived: 13, commits: 3') })