-
Notifications
You must be signed in to change notification settings - Fork 40
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
feat: support React Server Components #178
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
size-limit report 📦
|
Codecov Report
📣 This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more @@ Coverage Diff @@
## master #178 +/- ##
==========================================
- Coverage 99.29% 99.23% -0.06%
==========================================
Files 18 21 +3
Lines 2426 2367 -59
Branches 133 125 -8
==========================================
- Hits 2409 2349 -60
- Misses 17 18 +1
|
angeloashmore
changed the title
feat: add
feat: add React Server Components support
Apr 22, 2023
@prismicio/react/rsc
entry with React Server Components support
angeloashmore
changed the title
feat: add React Server Components support
feat: support React Server Components
Apr 24, 2023
This reverts commit ebfb24d.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Types of changes
Description
This PR adds support for React Server Components (RSC).
RSC-compatible versions of components are provided automatically when used in Server Components.
This PR makes use of
@prismicio/client
v7. It is marked as a dependency, not a peer dependency, to be compatible with apps that have not updated to v7.APIs modified for Server Components
<PrismicLink>
: No longer supports global configuration forinternalLinkComponent
,externalLinkComponent
, andlinkResolver
.<PrismicRichText>
: No longer supports global configuration forrichTextComponents
.APIs provided unmodified
<PrismicImage>
<PrismicText>
<PrismicToolbar>
<SliceZone>
APIs not supported in Server Components
<PrismicProvider>
: Global configuration is no longer possible; React Context is not supported in RSCs.async
/await
and@prismicio/client
directly.How to use
This PR is a work in progress. Once the API matures, a guide on using
@prismicio/react
with React Server Components will be provided.Until the PR is merged, all APIs and names are unstable and may change.
Checklist:
🐱