Effect CommunityEC
Effect Community4mo ago
6 replies
jessekelly

Atom Refreshability Issue with AtomRuntime.atom

Is this a bug? I was expecting an atom created w/ AtomRuntime.atom to be refreshable. I.e. by just recalling the Effect. I ran into this because I expected Atom.refresh re-call the Effect and update the value. Which it isn't doing atm.

export const testAtom = AtomRuntime.atom(
  Effect.gen(function* () {
    return yield* Effect.void;
  }),
);

console.log(testAtom.refresh); // undefined
Was this page helpful?