5 ms·
Will you make a fresh HTTP request every time the client needs to render a component? You could persist data client-side to make things more efficient. It would
by paxy 9y ago
Will you make a fresh HTTP request every time the client needs to render a component? You could persist data client-side to make things more efficient. It would be best to use a state container to manage this. Maybe something like Redux?
- asp2insp 9y agoNaively, yes, but in practice this is one of the things a good graphql client library can solve. Apollo Client, for example, will bundle query fragments from all your components together into a single request, and manage caching under the hood for you.