Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature Request: Support react server components #682

Open
1 task done
danteissaias opened this issue May 4, 2023 · 3 comments
Open
1 task done

Feature Request: Support react server components #682

danteissaias opened this issue May 4, 2023 · 3 comments
Labels
enhancement New feature or request

Comments

@danteissaias
Copy link

Is there an existing issue for this?

  • 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

@danteissaias danteissaias added the enhancement New feature or request label May 4, 2023
@dylanjha
Copy link
Contributor

Thanks for this @danteissaias !

@decepulis I think you looked into this, any reason we should not add the "use client" directive ourselves?

@decepulis
Copy link
Contributor

decepulis commented Jun 27, 2023

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

@danteissaias
Copy link
Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants