I
I
ivankirshin2018-05-31 19:39:47
Vue.js
ivankirshin, 2018-05-31 19:39:47

What is the correct way to nullify a child component?

Simple question, there is a timer component. What is the correct way to nullify it from the parent component.
Just add a property, for example, reset, and then immediately remove it? Just so essentially I'll be doing two actions to simulate a simple event? How do they act in such situations?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Anton Shvets, 2018-05-31
@ivankirshin

How to send a signal to a child component - https://jsfiddle.net/xnjc03hy/111/
In the parent, change the signal value, in the child, change the props.
assignment {} creates a new object, so the reference to it is new each time. You can use Math.random().

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question