Home>

I have a home page that has a Header component that has a button that calls a modal window, the modal window is a normal UI element with basic settings, to which I need to pass HTML with for example registration, but I don’t quite understand how correctly done while storing the state without Vuex. At the moment it looks like this:

Homepage
controllers
  |__ModalsController.js //here I planned to store the state of the modal window (open/closed/switched)
ui
 |__ Header.vue //here is a button that calls a specific modal window (for example, registration)
 |__ ModalBase.vue //modal window base layout
pages
    |__Login.vue //layout modal login window

But after reading the documentation several times, I did not figure out how to connect it all. I would be very grateful if someone could tell me. Thanks in advance!

Why don't you want to use VUEX?

Александр Рогонов2022-02-14 15:53:49

In the documents and on Habré, many write that with the Composition API, VUEX is not needed (habr.com/ru/company/otus/blog/570138/0)

Nina2022-02-14 18:56:59

It says "you may or may not need it". And maybe it will be needed. It's just strange not to use such a convenient and useful thing as VUEX.

Александр Рогонов2022-02-14 19:04:22