From 2e71d8c0d63e969249f8326a9dbac6d84d57749a Mon Sep 17 00:00:00 2001 From: daishi Date: Fri, 6 Oct 2023 11:15:44 +0900 Subject: [PATCH] remove a line and add a comment --- src/mutableAtom/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mutableAtom/index.ts b/src/mutableAtom/index.ts index c92056c..d3ca809 100644 --- a/src/mutableAtom/index.ts +++ b/src/mutableAtom/index.ts @@ -74,7 +74,7 @@ export function makeMutableAtom( */ function createProxyState(initialValue: Value, getStore: () => Store) { const proxyState = proxyFn({ value: initialValue }) - proxyState.value = initialValue + // We never unsubscribe, but it's garbage collectable. subscribe(proxyState, onChange(getStore), true) return proxyState }