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

Include "use client" directive #358

Open
4 tasks
lukaskratzel opened this issue May 15, 2024 · 1 comment
Open
4 tasks

Include "use client" directive #358

lukaskratzel opened this issue May 15, 2024 · 1 comment

Comments

@lukaskratzel
Copy link
Contributor

Why

Integrating Corbado components in Next.js via @corbado/react currently requires a wrapper file with the 'use client' directive on the top.
Most React libraries relying on client-side features like state have included that directive in their components so they don't require a wrapper and can just directly be imported into server component files.

I see special importance in PasskeyList and CorbadoProvider as they usually are used in server components.
Authentication related components are less important as they use client side logic (e.g. for routing) anyways most of the time and thus need to be put into a "use client" file anyways

TODOS

Here you must list all the TODOS using TODO checkboxes (markdown).

  • Include a "use client" directive on the top of each file containing exported components

Acceptance criteria

Here you must define the acceptance criteria of this issue (what has to work, what should the developer test and so on). Use TODO checkboxes (markdown).

  • PasskeyList has "use client" up top
  • CorbadoProvider has "use client" up top
  • Authentication components has "use client" up top
@Aby-JS
Copy link
Contributor

Aby-JS commented May 27, 2024

@lukaskratzel I checked after adding use client on the @corbado/react components. We still need to add use client on their wrappers in NextJS application.

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

No branches or pull requests

2 participants