React Native · Mobile UI at native speed

How do you choose a state management approach in React Native?

Mediumstate managementcontextserver stateUpdated Oct 2026
Quiz this track

Short answer

Keep local UI state in components, lift shared client state into context or a small store, and keep server data in a query cache. Choose the lightest tool that matches the scope and lifetime of the state.

Most state problems are scoping problems, not library problems. Before adding a global store, decide whether the value is local to a screen, shared across a feature, or owned by the server. Each has a different natural home.

  • Local UI state: useState or useReducer inside the screen
  • Feature state shared by a subtree: context with a reducer, split by concern
  • Cross-feature client state: Zustand, Redux Toolkit or Jotai depending on the model
  • Server state: TanStack Query or an equivalent cache with retries and invalidation
  • Persistent state: AsyncStorage, MMKV or a database behind a repository layer
tsx
import { create } from "zustand";

type CartState = {
  items: string[];
  add: (id: string) => void;
  clear: () => void;
};

export const useCart = create<CartState>((set) => ({
  items: [],
  add: (id) => set((state) => ({ items: [...state.items, id] })),
  clear: () => set({ items: [] }),
}));
A small store solves cross-screen state without wrapping the app in providers.

Context is fine for low-frequency values such as theme or auth session, but every consumer re-renders when the provider value changes. For high-frequency updates, a selector-based store avoids broad re-renders. Server data should not be copied into a client store by hand; that creates two sources of truth and stale views.

Persist only what must survive a restart, and version the persisted shape. Migrating a serialised store after a release is harder than designing the schema up front.

Follow-ups you should expect

Interviewers use these to check whether the first answer was understanding or memorisation.

  1. 1When is Context a bad choice?
  2. 2How do you separate server state from client state?
  3. 3How do you persist state safely across app updates?
  4. 4Why can a global store make performance worse?

Say it in the interview

I start by scoping the state. Local screen state stays in the component, feature state can live in a context or reducer, and cross-feature client state goes into a small selector-based store. Server data belongs in a query cache rather than being copied into a global store, because that avoids stale duplicate sources of truth. I choose the lightest tool that matches the lifetime of the data.

Use this as a model, not a script. Saying it in your own words is what makes it survive follow-up pressure.

Related questions

Reading is step one

Now say it out loud.

Understanding an answer and delivering it under pressure are different skills. Rehearse this topic in a live React Native mock interview and get scored feedback on depth, clarity and confidence.