Answer the question
In order to leave comments, you need to log in
Why does everything after .mount disappear in Vue?
//main.js
import { createApp, ref } from 'vue'
const app = createApp({
setup() {
const someValue = ref(10);
return {someValue}
}
})
app.mount('#counter')
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<link rel="icon" href="/favicon.ico" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Vite App</title>
</head>
<body>
asdas
<div id="counter">
Counter: {{ someValue }}
</div>
<script type="module" src="/src/main.js"></script>
</body>
</html>
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question