Built-in support option for Next.js app router and RSCs ("use client") #4268
-
Late last year I tested out a migration of the Twilio Docs from using the pages router to trying out the newer app router. One hurdle that we had to overcome was the rift between server and client components in the new paradigm, which was exacerbated a little bit by Paste's components. Even importing a stateless component like We found a workaround that let us get error-free server rendering, which involved either individually importing Paste components and then rexporting them from a file with the new Ideally we wouldn't need workarounds like this, but I'm not sure if Next.js-specific support is part of Paste's plans (although RSC in some capacity will be standard across React frameworks someday? ™️ ), so I hesitate to make a request such as "could Paste add 'use client' to all of their exports?" Even if care was taken to only add Hoping this can at least start the conversation on possible next steps, for either/both team(s) 😄 |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 4 replies
-
Disclaimer: This is a very experimental bot using OpenAI's GPT-4. The answers may not be correct, a human will review the answer and update it if necessary. Sorry, I don't know how to help with that. I did do a search though, and I managed to find these other Discussions that might be similar or related to your question. Give them a read to see if they answer your question. If they do, head back here and update this discussion and mark it as answered, pointing others to the related discussion:
|
Beta Was this translation helpful? Give feedback.
-
Hey @stern-shawn ! Our engineering team started looking into this today. In the meantime, @PixeledCode suggested:
|
Beta Was this translation helpful? Give feedback.
-
Just pulled in the latest release and it appears to be working with our docs sub-app that's on the Next.js |
Beta Was this translation helpful? Give feedback.
Hey @stern-shawn ! Our engineering team started looking into this today.
In the meantime, @PixeledCode suggested: