5 min listen
State bloating vs api call (again and again)
State bloating vs api call (again and again)
ratings:
Length:
7 minutes
Released:
Jun 24, 2022
Format:
Podcast episode
Description
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
Thanks again for this opportunity & Regards
Rahimuddin
Released:
Jun 24, 2022
Format:
Podcast episode
Titles in the series (100)
Separation of rendering vs logics custom hooks: Harun asked this on 2022-05-25 by The Call Kent Podcast