Discover this podcast and so much more

Podcasts are free to enjoy without a subscription. We also offer ebooks, audiobooks, and so much more for just $11.99/month.

State bloating vs api call (again and again)

State bloating vs api call (again and again)

FromThe Call Kent Podcast


State bloating vs api call (again and again)

FromThe Call Kent Podcast

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
Released:
Jun 24, 2022
Format:
Podcast episode

Titles in the series (100)

The Call Kent podcast is a regular podcast where you call in with a question and Kent answers. Call in with your questions right from your web browser with any device at https://kentcdodds.com/call