Coding⏱️ 2 min read📅 2026-06-03

How to Fix: vuejs update parent data from child component

Update parent data from child component in Vue.js

Quick Answer: {"method": "$emit", "example": "$parent.name = \"new name\""}

To update the parent data from a child component in Vue.js, you can use an event emitter or emit events between components. One common approach is to use the $emit method on the child component and the $on method on the parent component.

⚠️ Common Causes

  • Passing a bound prop from the parent can throw warnings and is not recommended.

🚀 How to Resolve This Issue

Method 1: Emitting Events

  1. Step 1: Create an event emitter on the child component and emit an event when the input value changes.

Method 2: Using Vuex or a centralized state management system

  1. Step 1: Create a store and register the child component as a watcher.

✨ Wrapping Up

To update the parent data, use the $on method on the parent component and listen for the event emitted by the child component.

Did this fix your problem?

If not, try searching for specific error codes.

🔍 Search Error Database

❓ Frequently Asked Questions