Closed dillondotzip closed 4 years ago
I can also do JSON.stringify()
and JSON.parse()
, but this makes it difficult when using typescript. Also, this seems to be apart of Next.js. According to them, they don't serialize in getServerSideProps
as Date
would cause hydration issues.
@dillonraphael we have a superjson babel plugin that will enable Dates to be passed through gSSP just like you want. There's currently a bug where it's not working in blitz apps. But as soon as that's fixed, we're going to add that to Blitz.
So somewhat soon, you'll be able to do this :)
What is the problem?
Using
ssrQuery
to run queries ongetServerSideProps
, but when passing the data back to props I get:Steps to Reproduce
Use any page with a query:
Other
Of course I can destructure the object, but that can get tedious with a lot of keys & values.