Using NextUI components with "createStreamableUI()" #1487
Unanswered
Codeshark-NET
asked this question in
Help
Replies: 2 comments
-
Same issue, hope to hear more about it. |
Beta Was this translation helpful? Give feedback.
0 replies
-
Hi, I have encountered the same problem. Make sure you get the server action via the |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi there!
Using the example from the documentation, I seem unable to stream back components from NextUI.
Here's the server action:
And on the client:
Running the server action results in the following error:
Error: createContext only works in Client Components. Add the "use client" directive at the top of the file to use it. Read more: https://nextjs.org/docs/messages/context-in-server-component
That's understandable, but how does one get around this? If I'm using a UI framework, I'd naturally be reluctant to create specific server-only components instead.
Or is this a fundamental issue where I'd be better off just streaming back the JSON to the client and dealing with it there?
Thanks a bunch! 🎸
Beta Was this translation helpful? Give feedback.
All reactions