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

Support Next.js 13 Server Components #7

Open
nyarthan opened this issue Nov 11, 2022 · 1 comment
Open

Support Next.js 13 Server Components #7

nyarthan opened this issue Nov 11, 2022 · 1 comment

Comments

@nyarthan
Copy link

When passing objects from Server Components to Client Components that contain e.g. a Date you get following Warning:

Warning: Only plain objects can be passed to Client Components from Server Components. Date objects are not supported.
  {createdAt: Date}
              ^^^^

The corresponding data in the Client Component would than be a stringified version of the object. This is arguably worse than Next.js 12 throwing an error.

@AryanJ-NYC
Copy link

Leaving this here for the next person: https://github.com/blitz-js/next-superjson-plugin

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

No branches or pull requests

2 participants