Closed rubendinho closed 1 year ago
Latest commit: 79af64d4d4be0fe89bebb778aaf624e33f53c08d
Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.
Click here to learn what changesets are, and how to add one.
Click here if you're a maintainer who wants to add a changeset to this PR
Big thanks for this PR. However, I'm not planning to introduce any platform/framework specifics in this library
Big thanks for this PR. However, I'm not planning to introduce any platform/framework specifics in this library
@devrnt I don't believe the "use client" is framework-specific. It's part of React's server component realm. See https://github.com/reactjs/rfcs/blob/main/text/0227-server-module-conventions.md
NextJS happens to be the first major framework adopting RSCs.
Big thanks for this PR. However, I'm not planning to introduce any platform/framework specifics in this library
@devrnt I don't believe the "use client" is framework-specific. It's part of React's server component realm. See https://github.com/reactjs/rfcs/blob/main/text/0227-server-module-conventions.md
NextJS happens to be the first major framework adopting RSCs.
Fair enough, but I stand by my position. This could be reconsidered in the future when the adoption rate is higher and/or this feature is more requested
The App Router in NextJS 13 requires Providers used in server components to have the
use client
directive.This means that using IntercomProvider in a Root Layout (which must be an SRC) requires wrapping it in a client-side component.
This PR declares the provider as a client component.
See: https://nextjs.org/docs/getting-started/react-essentials#rendering-third-party-context-providers-in-server-components