The Call Kent Podcast
Trailer
Bonus
Episode 10
Season 2
State bloating vs api call (again and again)
When a user enters the tab (btw it's a SPA) I call the api in useEffect and saving the response in redux store. May I know is it better approach to call the api again and again when the user leaves and enters the page? (In this case I see a flicker of loading every time) or storing the response in redux store (UX for this screen is good but is it harming the performance overall?) or storing the response in component state? (Is there any difference b/w this and above approach performance wise?)
Thanks again for this opportunity & Regards Rahimuddin