β Fullstack with Vue.jsQuestion 29 of 62
How do you send data from child to parent?
π Explanation
Emitting a custom event like emit("update", value) and listening with @update on the parent is the standard Vue pattern for child-to-parent communication. Props only flow downward from parent to child, so using them to pass data up is backwards, and using refs or global variables bypasses Vue's intended reactive, decoupled communication model.
Related questions
β PreviousNo login needed