How to Access Child Method From the Parent in VueJS ? Last Updated : 28 Apr, 2025 Summarize Comments Improve Suggest changes Share Like Article Like Report In this article, we are going to discuss how can we access the child method from the parent in VueJS. We need to create such a component that shows the use of accessing the child methods from the parent component. Approach:We will create two components ParentMethod and ChildComponent.ParentMethod vue.js component consists of a parent component which is named as “ParentMethod” and this method also includes a child component which is named as “ChildComponent” as we can also see in the code that the parent component also has a template and this template is with a view which contains a child component and a message called as displaydiv finally the component or the child component is passed as a method called “ParentMethodCall” as prop.ChildComponent vue.js component consists of a Child component which is named as “ChildComponent” it contains three different developments that are clickable they are labelled as “G”, “F” and “G”. We can also see that each of the div elements has an click event handler which is defined as “v-on:click” this triggers the “ClickEvent” method when it is clicked what happens then is that the click event updates the msg data property with a message that is concatenated with the data received as an argument after this it also logs the message to the console and then calls the method which is passed as a prop named call method with the same data.Example: This example shows the implementation of the above-explained approach. ParentMethod.vue <template> <div > <child-component :callMethod="parentMethodCall"> </child-component> <br/> <div class="msg">{{msg}}</div> </div> </template> <script> import Vue from "vue"; import ChildComponent from "@/components/ChildComponent"; export default { components: { ChildComponent: ChildComponent }, name: "ParentMethod", data() { return { msg: "MSG from parent method:" }; }, methods: { parentMethodCall: function(data) { this.msg = "MSG from parent method: " + data; console.log(this.msg); } } }; </script> <style scoped> .msg{ color: green; font-size: 15px; } </style> ChildComponent.vue <template> <div> <div style="cursor:pointer;" v-on:click="clickEvent('G')">G</div> <div style="cursor:pointer;" v-on:click="clickEvent('F')">F</div> <div style="cursor:pointer;" v-on:click="clickEvent('G')">G</div> <div class="msg">{{msg}}</div> </div> </template> <script> import Vue from "vue"; export default { name: "ChideComponent", data() { return { msg: "MSG from child method:" }; }, props: { callMethod: "" }, methods:{ clickEvent(data){ this.msg= "MSG from child method: "+ data console.log(this.msg); this.callMethod(data); } } }; </script> <style scoped> .msg{ color: red; font-size: 15px; } </style> Output: Once we execute both the files with the package in our project folder, we will see the following result. accessing child method from the parent Comment More infoAdvertise with us Next Article How to Update Parent Data from Child Component in VueJS? K kishankaushik Follow Improve Article Tags : JavaScript Web Technologies Geeks Premier League Vue.JS Geeks Premier League 2023 +1 More Similar Reads How to get Access to a Child Method From the Parent in VueJS ? When working with Vue.js components, it's common to encounter scenarios where you need to access a method inside the parent component that is defined in a child component. This can be useful for triggering specific actions or updating the child component's state.Below are the methods that can be use 4 min read How to Call a Parent Method from a Child Component in Vue 3 ? Vue.js is a JavaScript framework for building user interfaces. In Vue 3 parent and child component can communicate with each other through props and events. Props are used to pass the data from the parent to the child component and events are used to pass the data from child to parent component. The 3 min read How to call a parent method from child class in JavaScript? Inheritance in programming allows a class to derive methods and properties from another class, similar to how a child inherits traits from its parents. A child class can have its properties in addition to inherited ones. The deriving class is called a derived, sub, or child class, while the class it 3 min read How to Update Parent Data from Child Component in VueJS? In Vue.js, communication between components is essential for building dynamic applications. One common scenario is updating the parent component's data from a child component. we will cover several ways to achieve this, including custom events, and v-model. Updating parent data from a child componen 3 min read How to Pass Value from One Child Component to Another in VueJS ? Vue.js is a JavaScript framework used in building powerful and beautiful user interfaces. The key feature of Vue.js is its component-based architecture that allows the developers to create reusable and modular components. In this article, we will learn how to pass value from one child component to a 3 min read How to listen for Prop Changes in VueJS ? In Vue.js, props provide the mechanism for parent components to share data with their child components. While props themselves are reactive, meaning changes in the parent component automatically trigger a re-render of the child component, sometimes we might need to react to specific prop changes wit 3 min read Like