New Jun 7, 2026

Where to fetch and store global data (user, venue, socket) in React [closed]

Libraries, Frameworks, etc. All from Newest questions tagged reactjs - Stack Overflow View Where to fetch and store global data (user, venue, socket) in React [closed] on stackoverflow.com

In large applications we need global data, which means some data needs to be fetched first/globally,

Where should i call the api and set data in state

My approach for now:

So is this valid? Or there is better approach? Because i'm confused whether to use in context, but if something in context renders it renders whole those states as well. or i can use hook like this too.

Scroll to top