tim-smart / tim-smart/effect-atom
refresh fails for withReactivity atoms seeded via initialValues
Open
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 792
- Forks
- 49
- PR merge metrics
- No merged PRs in 30d
Description
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)
})
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the TypeScript reproduction in the issue and trace Registry.make with initialValues, Atom.initialValue, Atom.withReactivity, and Registry.refresh. Run the reproduction, then confirm that refreshing the seeded atom changes its value from 0 to 1 as expected.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 45/100