Skip to content

Commit

Permalink
fix: add atom listeners on derived atom update
Browse files Browse the repository at this point in the history
  • Loading branch information
gdorsi committed Oct 8, 2021
1 parent 7f998fd commit c9e4bb1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -495,7 +495,7 @@ export function createDerivedAtom<S, U = S>({
const setState: StateUpdateDispatcher<S> = atom.setState as any;

function revalidate() {
setState(get(api));
setState(get(getAPI));
}

atom.setState = (state) => {
Expand Down

0 comments on commit c9e4bb1

Please sign in to comment.