Effect CommunityEC
Effect Community3mo ago
11 replies
harrysolovay

Utilizing Another Atom Within Atom.fn

How can I utilize another atom within an Atom.fn? Hoping for something like the following:

export const registerAtom = Atom.fn(Effect.fn(function*(get, displayName: string) {
  const other = yield* get.result(otherAtom)
  // ...


It doesn't seem that the fn passed to Atom.fn exposes such a param... is there another way to achieve this?
Was this page helpful?