I can't find out how to pass a reactive variable into Vue.js component without using HTML templates.
I use this code for component rendering
var App = require('./app.vue').default;
var test = 'hey!';
var app = new Vue({
el: '#app',
data: {
message: test
},
components: { App },
render: h => h('app', { props: {message: test}})
})
It works fine and my component renders with 'hey', but the problem that I am facing is the fact that whenever I change
var test = 'hey!';
variable (in browser's developer console) then nothing seems to change in my component, it's only rendering 'hey'.
As I understand, I would have to pass
app.message
into my component to make it reactive, but how would I go about doing this? Or perhaps is there some other way to achieve this?
I set it up to work with Typescript and single file components in Webpack.