Fetch once and never again?
Hey there 👋, I'm wanting to fetch some data
reactionTypes
once when my layout <MainLayout />
renders in Nextjs and never again because this data does not change. Currently, I have placed (what I think is) a headless component into my layout that accesses the query client then sets a staleTime: Infinity
default on this specific query.
Is this a dumb strategy? How might you do this differently?
0 Replies