I'm trying to run the code from Vue docs about components, but the component doesn't show up. Why not?
<html>
<head>
<script src="https://cdn.jsdelivr.net/npm/vue"></script>
</head>
<body>
<div id="app">
<todo-item></todo-item>
</div>
<script>
Vue.component('todo-item', {
template: '<li>This is a todo</li>'
})
</script>
</body>
</html>
You need to create a Vue instance, and tell it where in the page its root element belongs (
#app
in this case):