elements
elements copied to clipboard
Feature Request: Support react server components
Is there an existing issue for this?
- [X] I have searched the existing issues
Which Mux Elements/Packages does this apply to? Select all that apply
mux-video-react, mux-audio-react, mux-player-react
Description
Add "use client" directive to the output bundle. https://beta.nextjs.org/docs/rendering/server-and-client-components#convention
Expected Behavior
N/A
Thanks for this @danteissaias !
@decepulis I think you looked into this, any reason we should not add the "use client" directive ourselves?
Thanks, @danteissaias! And yeah @dylanjha we should totally do this.
The only gotcha, esbuild strips out directives like "use client", so we'll have to consider postbuild steps for adding the directive back. I know @luwes considering approaches over in #712
Thanks, @danteissaias! And yeah @dylanjha we should totally do this.
The only gotcha, esbuild strips out directives like
"use client", so we'll have to consider postbuild steps for adding the directive back. I know @luwes is already on it.
"use client" can be added as a banner