[Vuejs]-How to update the value of child component's props from parent component?

0πŸ‘

βœ…

to achieve that you should use event bus communication between these two components. first, you should create a global event bus that can be a central event management and will give you the possibility to access any event from any component within your vuejs app. in your case here, you should emit an event from your parent component within viewNextWeek method and catch it within mounted in child component. so every time your mon value change within your parent component, will trigger an event to the child component to update mon within it.

for more detail for how to use global event bus, read this article global event bus article

πŸ‘€Thamer

Leave a comment