4 ms·
We're just in the process of switching to GraphQL for data fetching, pretty shocked people would even consider trying to hack client-side state management into
by mikewhy 6y ago
We're just in the process of switching to GraphQL for data fetching, pretty shocked people would even consider trying to hack client-side state management into it.
Redux still fills that role very well.
- d0m 6y agoI don't particularly like Apollo, but the reasoning is that if you fetch data with Apollo on the client-side, then that data is already available in their cache. If you were to use Redux, you'd have to copy that same data in your store.. so might as well use their cache instead. However, this is only for fetched data, not all client-side state management. Personally, I don't like the "write client-side resolvers mimicking the server resolvers" approach. I'd much rather have a database that is synched with the server and listens for new changes. Once you have your "offline-synched-db", you get offline, optimistic-UI & real-time for free.