Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import React from 'react';
- import { createApp, defineAsyncComponent } from 'vue'
- const VueApp = defineAsyncComponent(() => import('vueApp/App'))
- const ReactApp = () => {
- const vueApp = React.useRef()
- React.useEffect(() => {
- const app = createApp(VueApp, { /* props */ })
- app.mount(vueApp.current)
- return () => {
- app.unmount()
- }
- }, [])
- return <div>
- <div ref={vueApp} />
- </div>
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement