veaury icon indicating copy to clipboard operation
veaury copied to clipboard

Nuxt 3: Objects are not valid as a React child

Open augustjourney opened this issue 2 years ago • 3 comments

Tried to add react to components to vue app with vite, worked perfectly. Thanks a lot!

Trying to add the same react components to vue in nuxt 3, got errors :(

Objects are not valid as a React child (found: object with keys {__v_isVNode, __v_skip, type, props, key, ref, scopeId, slotScopeIds, children, component, suspense, ssContent, ssFallback, dirs, transition, el, anchor, target, targetAnchor, staticCount, shapeFlag, patchFlag, dynamicProps, dynamicChildren, appContext, ctx}). If you meant to render a collection of children, use an array instead.

My deps if that helps

"devDependencies": {
    "@nuxt/devtools": "latest",
    "@types/node": "^18",
    "nuxt": "^3.6.1"
  },
  "dependencies": {
    "@vitejs/plugin-react": "^4.0.1",
    "@vitejs/plugin-vue-jsx": "^3.0.1",
    "react": "^18.2.0",
    "react-dom": "^18.2.0",
    "veaury": "^2.3.12"
  }

Maybe you already know where I should dig into. Thanks.

augustjourney avatar Jul 03 '23 11:07 augustjourney

Minimal Reproduction: https://github.com/augustjourney/veaury-nuxt-3-reproduction

augustjourney avatar Jul 03 '23 12:07 augustjourney

@augustjourney SSR is currently not supported.

devilwjp avatar Jul 04 '23 16:07 devilwjp

Even with SSR disabled, there is the same error message Objects are not valid as a React child

ekkaiasmith avatar Oct 11 '23 17:10 ekkaiasmith