QwikDev / astro

Qwik + Astro integration
216 stars 13 forks source link

Objects are not valid as a React child #57

Closed PaulieScanlon closed 10 months ago

PaulieScanlon commented 10 months ago

Hey @thejackshelton here's the latest attempt, components have been moved to /components/react and components/qwik

and i still see the following error when visiting any of the React example pages:

Uncaught Error: Objects are not valid as a React child (found: object with keys {type, props, immutableProps, children, flags, key, dev}). If you meant to render a collection of children, use an array instead

Preview site is here: https://qwik-break-from-react.netlify.app/

Astro config is as follows and it doesn't seem to matter which order the integration is added.

import { defineConfig } from 'astro/config';
import qwikdev from '@qwikdev/astro';
import react from '@astrojs/react';
import tailwind from '@astrojs/tailwind';

export default defineConfig({
  integrations: [
    qwikdev({
      include: ['**/qwik/*'],
    }),
    react({
      include: ['**/react/*'],
    }),
    tailwind(),
  ],
});
thejackshelton commented 10 months ago

I've confirmed that this is an issue in the @astrojs/react integration. I will go ahead and create an issue there.

We don't have this problem with qwik-react. Here's a template https://github.com/thejackshelton/qwik-react-astro-template