I have a React/Redux application for my front-end, and a REST API for the backend and I use JWT as a sort of 'session' id (comes out of the box with Laravel Passport, my oAuth server).
Anyways, I was wondering what the best strategy is for hydrating the redux store when the page initially loads when you have a RESTful service that has endpoints for individual resources.
At the moment I'm doing it on component mount. So say a component lists a resource, I call the api/hydrate the store on component mount for that resource. This results in many API calls though, and it can result in unnecessary calls when the component mounts again.
Is there a better alternative to this that you're aware of? My main concern is that I don't want to introduce some weird endpoints to my API specifically for hydrating pages.