Skip to content
Discussion options

You must be logged in to vote

Thought I'd come back to this and share our approach here, which was to fetch any user info for the nav bar on the client side, while showing a skeleton in it's place until it's loaded. Note that this could also be achieved using partial pre-rendering, if this data should be fetched on the server-side.

In order to get our profile pages statically rendered and revalidated, we use export const generateStaticParams = () => [] in our /users/[username]/page.tsx file, which tells Next.js not to generate any at build time, but that these pages should instead be statically rendered when they're first visited. Then we can use revalidatePath('/users/example') when a user updates their profile page.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by GRA0007
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
1 participant