I have a React app using react-router
that uses Appwrite for authentication and the database. In the app, every page has a different URL path.
I want to be able to cache data locally in the front end to avoid recalling to Appwrite (for both speed and database limits). The data needs to be able to be passed between pages and URL paths. For example, if a user navigates to their account page, to the account settings page, and back to the account page, I want to avoid re-fetching data if nothing has changed. Is there a feature specific to React that allows for this?
I have tried using a state variable and passing props when calling the navigate
function, and updating the state in each page, but that doesn’t seem practical.