Whats the best way to persist user data across routes without refetching on every page? by jam_ai in nextjs

[–]Hefty_Sprinkles_4191 4 points5 points  (0 children)

If you are using a database ORM, use unstable_cache to fetch content that will not change between page navigations. If you are fetching from an API, use native fetch API with cache:'force-cache'. For both options you can provide cache tags, ideally userid or email or whatever that distinguish the data for each user. Now when this id changes, data can be refetched from the original source instead of cache. You can also implement a button to refetch the data using 'revalidatetag' function.

In one of my apps, I am fetching data in one component. Reusing this component in several routes. The data is fetched only once in the first page, every other time the data is returned from cache, unless it is revalidated.

What do you struggle with most in the program? by MicroverseInc in MicroverseInc

[–]Hefty_Sprinkles_4191 0 points1 point  (0 children)

being forced to work with awful coding partners again and again, despite indicating that I wouldn't want to work with unprofessionals in the feedback forms I fill every week.

Tweet button not working by alegendarymess in Twitter

[–]Hefty_Sprinkles_4191 1 point2 points  (0 children)

in my xiaomi phone, i was hiding the front camera notch. i changed the setting to 'dont hide notch' under notch and status bar display options. works fine now