I saw the api on the official website and this picture, but I don’t understand it very well. I feel that the components are similar to the custom instructions of angularjs..
过去多啦不再A梦2017-05-24 11:38:46
The general meaning is that the child component and the parent component communicate with each other. The child component may call the parent component's method, but please do not let the child component depend on the parent component and cannot be used in other places
给我你的怀抱2017-05-24 11:38:46
The parent component passes data to the child component through props, changes the state of the child component, etc.
The child component passes the event to the parent component through events for further processing
Reduces the coupling between components.
迷茫2017-05-24 11:38:46
The biggest feeling that Vue’s components give me is that as long as you write it well, I will introduce the components that need to pass parameters into the page. Even if I don’t pass anything, the component will not report an error