INNER CODE UNIT · TypeScript

patchSubtree

margelo/react-native-runtimes · packages/state/src/index.ts:457

  function patchSubtree<K extends SharedStoreSubtreeKey<TState>>(
    subtreeKey: K,
    subtreeState: TState[K],
  ): TState {
    return patchPath(subtreeKey, subtreeState);
  }

  function initialSubtree<K extends SharedStoreSubtreeKey<TState>>(
    subtreeKey: K,
  ): TState[K] {
    return initialPathValue(subtreeKey);
  }

  function initialJsonForSubtree(subtreeKey: string): string {
    return stringifyState(initialPathValue(subtreeKey) ?? null);
  }

  function publishJsonState(

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…