A
A
Alexander Zhukov2019-04-09 12:37:39
JavaScript
Alexander Zhukov, 2019-04-09 12:37:39

How to pass component state to child vue?

Hello! I'm doing a serious project on vue for the first time, so forgive me if the question is extremely stupid. There is such a component structure
TheHeader.vue --> HeaderLogOrReg.vue - here you need to catch a click and pass a boolean value to another component that is in such a structure.
App -> Modal - in the modal, you need to accept the state with HeaderLogOrReg

Answer the question

In order to leave comments, you need to log in

2 answer(s)
N
nvdfxx, 2019-04-09
@nvdfxx

https://codepen.io/nvdfxx/pen/qwRbOY?editors=1111
In general, if

I'm doing a big project
, then it’s somehow strange not to know the basic things, and for a serious project, the event bus or store is usually used like, you will most likely open the modal from not only one component

M
McBernar, 2019-04-09
@McBernar

https://ru.vuejs.org/v2/guide/components-props.html

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question