preactjs / next-plugin-preact

Next.js plugin for preact X
396 stars 9 forks source link

Error: Objects are not valid as a child. Encountered an object with the keys {0,1,2,3,4,5,6,7,8,9,10}. #65

Closed lfre closed 2 years ago

lfre commented 2 years ago

Repro: https://github.com/lfre/preact-render-to-string-issue

preact-render-to-string 5.2.4+ throws errors in Development mode. Three things cause this:

function MyComponent({ name }) {
    return <div>My {name}</div>
}
bfeister commented 2 years ago

Same issue on my end, in my case import useSWR from 'swr' is the cause (as opposed to preact-render-to-string )

lfre commented 2 years ago

Confirming this is fixed on preact-render-to-string 5.2.6 👍