Next.js Discord

Discord Forum

Circular Structure Error When passing complex objects with circular reference to another server comp

Unanswered
Tomistoma posted this in #help-forum
Open in Discord
Avatar
TomistomaOP
I can't seem to pass complex objects to other server components or functions without getting a circular structure error. Specifically, I'm using html-react-parser and manipulating certain elements to render custom jsx. It worked fine and without error in nextjs 14. Can anyone confirm for me if this is how nextjs 15 will handle complex objects with circular reference? It breaks a major dependency I have and I need to figure out if I need to move in another direction with my libraries.

Inside there is a link to a repo example and the issue I posted on GitHub.

https://github.com/vercel/next.js/issues/72189

1 Reply

Avatar
TomistomaOP
Is it normal and acceptable to be able to pass complex objects with circular reference in server functions and components? Next js 15 seems to stringify those parameters now causing an error. Didn’t happen in nextjs 14.