Skip to content
RED SAGSkills
mediumMobile App Developer interview question

How do you manage state in a Flutter or React Native app as it grows beyond a few screens?

What the interviewer wants to hear

  • Separate local UI state from shared app or server state
  • Use a state library (Riverpod, Bloc, Redux Toolkit, Zustand) for shared state
  • Use a server-state cache (TanStack Query) for API data
  • Unidirectional data flow and immutable state
  • Keep business logic out of widgets or components so it is testable

Model answer

I first split state into types. Local UI state, like whether a dropdown is open, stays in the widget or component with setState or useState. Shared app state, like the logged-in user or cart, goes in a dedicated layer: in Flutter I usually use Riverpod or Bloc, and in React Native Zustand or Redux Toolkit. Server data is really a cache, so in React Native I use TanStack Query, which handles loading, caching, refetching and invalidation, and in Flutter a repository with a provider that exposes async values. I keep data flowing one way: the UI dispatches events, logic updates immutable state, and the UI rebuilds. Business logic lives outside widgets so it can be unit tested. I also scope providers or selectors carefully so a change only rebuilds the parts of the screen that use it.

Can you answer it under time pressure?

Take a timed medium round and get scored on every answer.

Start mock interview

More medium Mobile App Developer questions