MCPcopy Create free account
hub / github.com/NativeScript/SimDeck / writePersistedUiState

Function writePersistedUiState

packages/client/src/app/uiState.ts:214–223  ·  view source on GitHub ↗
(
  updater: (current: PersistedUiState) => PersistedUiState,
)

Source from the content-addressed store, hash-verified

212}
213
214export function writePersistedUiState(
215 updater: (current: PersistedUiState) => PersistedUiState,
216): void {
217 if (typeof window === "undefined") {
218 return;
219 }
220
221 const nextState = sanitizePersistedUiState(updater(readPersistedUiState()));
222 window.localStorage.setItem(UI_STATE_STORAGE_KEY, JSON.stringify(nextState));
223}
224
225export function viewportStateForUDID(
226 state: PersistedUiState,

Callers 3

AppShellFunction · 0.90
promptForURLFunction · 0.90
promptForBundleIDFunction · 0.90

Calls 2

sanitizePersistedUiStateFunction · 0.85
readPersistedUiStateFunction · 0.85

Tested by

no test coverage detected