Skip to content

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

Merged
rayan1810 merged 4 commits into
GeekyAnts:patchfrom
jono-allen:use-sync-external-store
Feb 27, 2023
Merged

refactor: replaces use-subscription with use-sync-external-store#5664
rayan1810 merged 4 commits into
GeekyAnts:patchfrom
jono-allen:use-sync-external-store

Conversation

@jono-allen

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

vercel Bot commented Feb 7, 2023

Copy link
Copy Markdown

@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
Copy Markdown

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

@sajadghawami

Copy link
Copy Markdown

Also getting an error with react@18 and nextjs.

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

@sanketsahu

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