What should be persisted in the frontend and where?

github logo ・1 min read

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.

twitter logo DISCUSS
Classic DEV Post from Aug 29

How can open source contributors and maintainers engage in a respectful ongoing relationship?

Jean Aguilar profile image

Hey there reader...

Do you prefer sans serif over serif?

You can change your font preferences in the "misc" section of your settings. ❤️