The video for this lesson is currently being updated, please read the transcript instead.

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");

Vue 2 way

To view the complete lesson you'll need to login or join this course.


Click to load comments...