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!
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:59It 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- javascript : export 'default' (imported as 'Vue') was not found in 'vue'
- javascript : Calling a method in a class
- javascript : Is it possible to somehow change the color of the vueJS placeholder
- javascript : Area of responsibility for design
- javascript : How to add image display for selected element in vue-select (maybe not vue-select)?
- javascript : Loading scss variables into a module does not work
- javascript : vuejs filter is not function
- javascript : Vue: methods's this context calls undefined when accessing data
- javascript : How to get a reference for a button clicked and processed in @click in Vue.js
- javascript : Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'push')
Why don't you want to use VUEX?
Александр Рогонов2022-02-14 15:53:49