Next.js Discord

Discord Forum

Is there a way to implement custom serializing to pass more classes to client components

Unanswered
Sloth bear posted this in #help-forum
Open in Discord
Sloth bearOP
I'm trying to use Decimal.js, but passing the values from server to client results in errors. It'd be pretty easy to do a conversion (.toFixed(), then just do new Decimal(string value)) but I don't know if I can implement something that will let nextjs/react automatically do this for that class
Thank you

0 Replies