preactjs / next-plugin-preact

Next.js plugin for preact X
394 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 1 year ago

lfre commented 1 year 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 1 year 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 1 year ago

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