#better approach for contexts in nextjs

5 messages · Page 1 of 1 (latest)

bold gyro
#

So in order to use Context from react i have to mark component as "use client" which is not really optimal

but i dont really see other way than using Context in my app
scenario:
imagine a dashboard to manage guilds
you have a /dashboard to select which guild you want to manage
and then /dashboard/id to manage selected guild

to not fetch guilds each time they are needed i decided to make Context providers for all guilds and for selected guild is that good approach?

drowsy beaconBOT
#

🔎 This post has been indexed in our web forum and will be seen by search engines so other users can find it outside Discord

🕵️ Your user profile is private by default and won't be visible to users outside Discord, if you want to be visible in the web forum you can add the "Public Profile" role in id:customize

✅ You can mark a message as the answer for your post with Right click -> Apps -> Mark Solution
(if you don't see the option, try refreshing Discord with Ctrl + R)

half sorrel
bold gyro
#

how does the unstable_cache work