Reputation: 61
but have some React code done and want to use it like regular Vue component. I found package Vuera, but while trying to render react components I recive an error:
Error in file /src/components/MyReactComponent.jsx:4:2
The above error occurred in the <MyReactComponent> component:
[Vue warn]: Error in mounted hook: "TypeError: (0 , _vue.createTextVNode) is not a function"
TypeError: (0 , _vue.createTextVNode) is not a function
I'm using Vue^2.6.11
and I made new project with vue create .
, installed react^17.0.2
, react-dom^17.0.2
and vuera^0.2.7
via npm
.
This is link to sandbox with this simple setup.
What i'm doing wrong? Can someone show me the correct way?
Upvotes: 2
Views: 1458
Reputation: 31
I think what is going on is Vue doesn't know how to handle the JSX. But in general I would recommend sticking to only one framework or library and not trying to mix them.
Upvotes: 3