Skip to content

Simple example how to wrap React.createRoot within Vue. Maybe this helps with your migration plan.

Notifications You must be signed in to change notification settings

h2xd/react-in-vue

Repository files navigation

React in Vue

React in Vue

This a simple example on how to mount React components in a Vue context with Vite, while keeping most of the Vue features like two-way data-binding (v-model).

This is not the most ideal approach and suites just as PoC. Feel free to reach out to make the example better or just fork it. ❤️

Demo icon

Development

Install the following dependencies to start the development of the project.

Tool Description Link
NVM Node.js version manager https://github.com/nvm-sh/nvm#installing-and-updating

Then you can install the node.js version of the project by running

nvm install

After that you need to install the node_modules of the project by running the following command:

npm install

Then start the application by running

npm run dev

That's it happy development 🎉