R
R
re1mond2019-10-07 16:37:22
React
re1mond, 2019-10-07 16:37:22

How to call the callback function of an adjacent React component?

There is a parent component, it has two child components. How to implement a function call in child component No. 2 when an event is triggered in child component No. 2
There is a component with questions for the test, as well as a component of the last results. It is necessary that at the end of the timer countdown in the test component, the component with the results is updated.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
alexhovansky, 2019-10-07
@alexhovansky

Remove logic from components, move it to the parent and manage props

V
vadimMalovaniy, 2019-10-09
@vadimMalovaniy

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question