Skip to content

Commit

Permalink
remove a line and add a comment
Browse files Browse the repository at this point in the history
  • Loading branch information
dai-shi committed Oct 6, 2023
1 parent f95519f commit 2e71d8c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/mutableAtom/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ export function makeMutableAtom<Value>(
*/
function createProxyState(initialValue: Value, getStore: () => Store<Value>) {
const proxyState = proxyFn({ value: initialValue })
proxyState.value = initialValue
// We never unsubscribe, but it's garbage collectable.
subscribe(proxyState, onChange(getStore), true)
return proxyState
}
Expand Down

0 comments on commit 2e71d8c

Please sign in to comment.