Skip to content
Discussion options

You must be logged in to vote

I'e run into this a few times on larger RN apps, and what’s worked best for us is not trying to force everything into a single global loading state.

Most async stuff ends up being screen-level:

  • initial fetch when a screen mounts
  • submit / refresh / pagination
    Keeping that local makes the UI easier to reason about and avoids random global spinners showing up.

For things that truly block the whole app (auth bootstrap, app startup, forced re-sync), we keep loading state in a global store. We’ve used Zustand for this and it’s been pretty painless - small surface area and fewer unnecessary re-renders compared to Context.

We tried using Context for loading early on, but once the app grew it go…

Replies: 10 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by Tn0127
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet