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

refactor: replaces use-subscription with use-sync-external-store #5664

Merged
merged 4 commits into from
Feb 27, 2023

Conversation

jono-allen
Copy link
Contributor

migrates to use-sync-external-store to support react 18 and nextjs

Summary

React 18.x and nextjs 13.x raises the error

Error: Missing getServerSnapshot, which is required for server-rendered content. Will revert to client rendering.
This error happened while generating the page. Any console logs will be displayed in the terminal window.

Applying the same upgrade that nextjs applied to native-base fixes the error
https://github.com/vercel/next.js/pull/36733/files

Changelog

[refactor] [Changed] - Migrate to use-sync-external-store from use-subscription

Test Plan

Upgrading a project to react 18 and nextjs 13 resolves the error

@auto-assign auto-assign bot requested a review from surajahmed February 7, 2023 01:59
@vercel
Copy link

vercel bot commented Feb 7, 2023

@jono-allen is attempting to deploy a commit to the Geekyants Team Team on Vercel.

A member of the Team first needs to authorize it.

@patrick-roon
Copy link

@surajahmed is anyone available to review this? Also getting the same error.

@sajadghawami
Copy link

Also getting an error with react@18 and nextjs.

@surajahmed could you please take a look at this? :)

@sanketsahu
Copy link
Collaborator

Let me check it and get it merged!

@rayan1810 rayan1810 requested review from rayan1810 and removed request for surajahmed February 27, 2023 05:44
@rayan1810 rayan1810 changed the base branch from master to patch February 27, 2023 05:47
@rayan1810 rayan1810 merged commit 458beca into GeekyAnts:patch Feb 27, 2023
This was referenced Sep 8, 2024
This was referenced Sep 19, 2024
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.

7 participants