diff --git a/src/state/ViewModel.ts b/src/state/ViewModel.ts index 9a0a5d2e..9d245b71 100644 --- a/src/state/ViewModel.ts +++ b/src/state/ViewModel.ts @@ -37,7 +37,7 @@ export function createStaticViewModel( export function useStaticViewModel( snapshot: Snapshot, ): ViewModel { - const [vm] = useState(createStaticViewModel(snapshot)); + const [vm] = useState(() => createStaticViewModel(snapshot)); useEffect(() => { for (const key in snapshot) { (vm as unknown as Record>)[