Skip to content
Discussion options

You must be logged in to vote

Ok, I may have found the answer:

import { reactive, createApp, h } from 'vue'
import App from './App.vue'

const r = reactive({ msg: 'hi' });

const app = createApp({
    render: () => h(App, r)
});
const mounted = app.mount('#app');
console.log('Props: ', mounted.$props);
setTimeout(() => {
    console.log('msg: ', r.msg);
    r.msg = 'Hello!';
    console.log('msg: ', r.msg);
}, 4000);

This works. If anyone knows of a better way to do this, I'll be most grateful. I'll be also grateful for any links to information about the subject. I did read Reactivity in Depth in the docs, but it doesn't show you how to set things up from "outside".

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@ryanportfolio
Comment options

@webJose
Comment options

Answer selected by webJose
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants