Slide 55
Slide 55 text
JS
entries(node.dataset).forEach(([key, value]) !=> {
try {
props[key] = JSON.parse(value)
} catch (e) {
props[key] = value
}
})
!// Basic Root instance
const instance = {
name: 'App',
store: new Vuex.Store(store),
render(h) {
return h(
'div',
{
attrs: {
id: `app-${name}`,
},
},
[h(component, { props })]
)
},
}
return new Vue(instance).$mount(node)
}