blitz-js / next-superjson-plugin

SuperJSON Plugin for Next.js Pages and Components
189 stars 13 forks source link

Support for using superjson by default with server components (without `data-superjson`) #90

Open FeldrinH opened 10 months ago

FeldrinH commented 10 months ago

It would be nice if there was an option to enable data-superjson by default for React components, so any props passed from server component to client component are automatically serialized using superjson. With the data-superjson attribute it is easy to forget to add it, which can cause weird bugs that TypeScript can't protect you against.

kdelmonte commented 10 months ago

Agreed. This would be great!