`Error: Objects are not valid as a React child (found: [object Promise])` when testing RSC
Unanswered
Barbary Lion posted this in #help-forum
Barbary LionOP
When React Server Component is rendered inside testing library
is returned. When only the outermost component is async then it can be used like this:
However when
render method an errorError: Objects are not valid as a React child (found: [object Promise])is returned. When only the outermost component is async then it can be used like this:
render(await TheComponent())However when
TheComponent has async child component this method doesn't work. Is there any fix for this?