INNER CODE UNIT · TypeScript

getNitroStore

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

function getNitroStore(): NitroSharedZustandStore | null {
  if (cachedNitroStore !== undefined) {
    return cachedNitroStore;
  }

  try {
    cachedNitroStore = NitroModules.hasHybridObject('SharedZustandStore')
      ? NitroModules.createHybridObject<NitroSharedZustandStore>(
          'SharedZustandStore',
        )
      : null;
  } catch (error) {
    cachedNitroStore = null;
    console.warn('[threaded-zustand] Nitro store unavailable', error);
  }

  return cachedNitroStore;
}

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…