Skip to content

[V3]: SSR with NextJs - undefined cannot be serialized as JSON #1370

@tatchi

Description

@tatchi

Hey,

I've been trying to update a NextJs repo which uses hydration to V3 and got the following error:

image

Quickly looking at the code and there's indeed a fetchMeta state property set by default to undefined.

https://github.com/tannerlinsley/react-query/blob/4d01e1fd543d304d2b07defcd4cda55e089db88b/src/core/query.ts#L442

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions