taler-typescript-core

Wallet core logic and WebUIs for various components
Log | Files | Refs | Submodules | README | LICENSE

commit 84d4e68ab70c26ffcdccb5d62a507f9acf244fa3
parent aba173d8a906fa0ede0c3660bd37b11fb7a6a127
Author: Sebastian <sebasjm@gmail.com>
Date:   Wed, 30 Aug 2023 10:17:23 -0300

missing key subscription

Diffstat:
Mpackages/web-util/src/hooks/useLocalStorage.ts | 2+-
Mpackages/web-util/src/hooks/useMemoryStorage.ts | 2+-
2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/packages/web-util/src/hooks/useLocalStorage.ts b/packages/web-util/src/hooks/useLocalStorage.ts @@ -106,7 +106,7 @@ export function useLocalStorage<Type = string>( const newValue = storage.get(key.id); setStoredValue(convert(newValue)); }); - }, []); + }, [key.id]); const setValue = (value?: Type): void => { if (value === undefined) { diff --git a/packages/web-util/src/hooks/useMemoryStorage.ts b/packages/web-util/src/hooks/useMemoryStorage.ts @@ -51,7 +51,7 @@ export function useMemoryStorage<Type = string>( const newValue = storage.get(key); setStoredValue(newValue === undefined ? defaultValue : newValue); }); - }, []); + }, [key]); const setValue = (value?: Type): void => { if (value === undefined) {