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

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

Merged
merged 4 commits into from
Apr 28, 2024
Merged

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

merged 4 commits into from
Apr 28, 2024

Conversation

ascorbic
Copy link
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

Copy link

netlify bot commented Apr 28, 2024

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.

Copy link

netlify bot commented Apr 28, 2024

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.

Copy link

netlify bot commented Apr 28, 2024

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
23 checks passed
@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