Skip to content

refresh fails for withReactivity atoms seeded via initialValues #358

@0xh3x

Description

@0xh3x

To reproduce

it("refreshes after being seeded with an initial value", () => {
  const atom = Atom.make(() => 1).pipe(
    Atom.withReactivity(["counter"]),
    Atom.keepAlive
  )
  const r = Registry.make({
    initialValues: [Atom.initialValue(atom, 0)]
  })
  assert.strictEqual(r.get(atom), 0)
  r.refresh(atom)
  assert.strictEqual(r.get(atom), 1)
})

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions