Mar 15, 2022
Heya!
For a PoC, React alone with the built-in useState/useReducer/Context API state management goes a long way. You could use GraphQL just for data fetching then.
Alternatively, you could opt to combine all state management and data fetching within the GraphQL layer with local resolvers, allowing you to treat local state as yet another GraphQL operation. The latter is especially handy if you need to add/enrich further data from local state into server side GraphQL data. Apollo and Urql GraphQL libraries both have local state management options built-in or via plugin packages.
Both approaches should be easily scalable within the context of your use case.
React Context API has issues with causing re-renders on all paths in the tree and requires using memoization for optimizing that. Depending on how frequently or how much the data changes, you could look at Jotai or Zustand or similar that manages the state outside of React and provides powerful features to last beyond a PoC.
Hope that's helpful :)












