Skip to content

Commit f57a5c9

Browse files
committed
make .store atom an explicit Effect
1 parent ece519c commit f57a5c9

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

.changeset/old-badgers-beam.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@effect-atom/atom-livestore": patch
3+
---
4+
5+
make .store atom an explicit Effect

packages/atom-livestore/src/AtomLivestore.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ export const Tag = <Self>() =>
8282
)
8383
)
8484
self.runtime = Atom.runtime(self.layer)
85-
self.store = self.runtime.atom(() => self)
85+
self.store = self.runtime.atom(Effect.contextWith(Context.get(self)) as any)
8686
self.storeUnsafe = Atom.readable((get) => {
8787
const result = get(self.store)
8888
return Result.getOrElse(result, constUndefined)

0 commit comments

Comments
 (0)