Skip to content

fix(react): support Next.js server component#646

Merged
ascorbic merged 4 commits into
mainfrom
rsc
Apr 28, 2024
Merged

fix(react): support Next.js server component#646
ascorbic merged 4 commits into
mainfrom
rsc

Conversation

@ascorbic

Copy link
Copy Markdown
Owner

Currently the Next.js component uses useEffect and useContext, so it doesn't work properly in server components. They were only used for checking the validity of props in dev, and this PR removes them. The dev server will give warnings instead. This means the component works properly in server components.

Fixes #642

@netlify

netlify Bot commented Apr 28, 2024

Copy link
Copy Markdown

Deploy Preview for unpic-next ready!

Name Link
🔨 Latest commit 19a2965
🔍 Latest deploy log https://app.netlify.com/sites/unpic-next/deploys/662e2c452275f90008c97dbc
😎 Deploy Preview https://deploy-preview-646--unpic-next.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@netlify

netlify Bot commented Apr 28, 2024

Copy link
Copy Markdown

Deploy Preview for unpic-angular ready!

Name Link
🔨 Latest commit 19a2965
🔍 Latest deploy log https://app.netlify.com/sites/unpic-angular/deploys/662e2c4533f65a00081b8244
😎 Deploy Preview https://deploy-preview-646--unpic-angular.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@netlify

netlify Bot commented Apr 28, 2024

Copy link
Copy Markdown

Deploy Preview for unpic-docs ready!

Name Link
🔨 Latest commit 19a2965
🔍 Latest deploy log https://app.netlify.com/sites/unpic-docs/deploys/662e2c4560e2d100089d4090
😎 Deploy Preview https://deploy-preview-646.preview.unpic.pics
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
Lighthouse
Lighthouse
1 paths audited
Performance: 99 (no change from production)
Accessibility: 100 (no change from production)
Best Practices: 92 (no change from production)
SEO: 100 (no change from production)
PWA: -
View the detailed breakdown and full score reports

To edit notification comments on pull requests, go to your Netlify site configuration.

@ascorbic
ascorbic merged commit a2e58ea into main Apr 28, 2024
@ascorbic
ascorbic deleted the rsc branch April 28, 2024 11:10
@mixie-bot mixie-bot Bot mentioned this pull request Apr 28, 2024
kodiakhq Bot pushed a commit that referenced this pull request Apr 28, 2024
🤖 I have created a release *beep* *boop*
---


<details><summary>react: 0.1.14</summary>

## [0.1.14](react-v0.1.13...react-v0.1.14) (2024-04-28)


### Bug Fixes

* **react:** handle fetchpriority vs fetchPriority ([#644](#644)) ([6b76808](6b76808))
* **react:** support Next.js server component ([#646](#646)) ([a2e58ea](a2e58ea))
</details>

---
This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).
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

Successfully merging this pull request may close these issues.

Error using @unpic/react/nextjs in a server component

1 participant