DEV Community

Jean Aguilar
Jean Aguilar

Posted on

What should be persisted in the frontend and where?

Hi guys I've been searching online and I could not find anything relevant. The thing is that I was wondering if you have any tips on persisting data, let's say if we perform a fetch to query something from the backend, should we persist it in the frontend even if a refresh, or a change of page is made, how do you handle that?

I know the auth credentials are normally stored in the session storage, local storage or even cookies, but is there anything relevant that we should store, let's say a request with lot's of data, is it a good idea to keep it somewhere, or is better to perform the request every time the given page is accessed?

Tag is react because is the library I'm most familiar with, but feel free to discuss if using another framework, library.

Top comments (0)