Skip to content

Making the library compatible with React Server Components #808

Open
@mjarosie

Description

@mjarosie

In Next.js in order to make the AuthProvider work on the client side with the new React Server Components feature - it needs to be wrapped in a component like this.

Would it be possible to avoid having to do this by making this library Client Component-compatible by adding 'use client' directive? As far as I understand (having a limited experience with React & Next.js) 'use client' directive isn't Next.js framework-specific, but rather soon-to-be part of the React specification, which means that this sort of modification wouldn't make react-oidc-context Next.js framework-specific.

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationImprovements or additions to documentationenhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions