Content
@
0 reply
0 recast
2 reactions
Brenner @ Edge City
@brenner.eth
Ok who wants to help me understand nextjs app router? And ‘use client’ vs ‘server-only’? I’m not used to not being able to have any “useState()” functions wherever I want??
10 replies
9 recasts
56 reactions
Doug Alcantara
@snuglas.eth
we learned a lot while migrating @hypersub to the app router (from Next 12, where we initially began dev on it). ideally, the `use client` boundary should be as far “down” the tree as you can get it. if you can identify/distill client components down to their interactive elements, and use server components for server things “higher up”, I think that’s a sign you’re moving in the right direction. router.refresh will trigger re-fetch/re-render on server components as well. requires a change to the mental model, certainly.
0 reply
0 recast
0 reaction