UNPKG

rnr-starter

Version:

A comprehensive React Native Expo boilerplate with 50+ modern UI components, dark/light themes, i18n, state management, and production-ready architecture

16 lines (13 loc) 378 B
import { create } from 'zustand'; interface AppState { count: number; error: string | null; increment: () => void; setError: (error: string | null) => void; } export const useStore = create<AppState>((set, get) => ({ count: 0, error: null, increment: () => set((state) => ({ count: state.count + 1 })), setError: (error: string | null) => set({ error }), }));