Configuring a Vue 3 instance
A modal window can be in one of two states - opened, or closed.
Let's manage this state by adding a boolean data property modalOpen
which we'll give an initial value of false
.
src/main.js
import { createApp } from "vue";
const app = createApp({
data: () => ({
modalOpen: false
})
});
app.mount("#app");
Click to load comments...