C
C
chakaponi2020-12-06 19:41:34
JavaScript
chakaponi, 2020-12-06 19:41:34

Do events in React only bubble up inside a component?

Is it true that events do not cross the barrier between components?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
C
chakaponi, 2020-12-06
@chakaponi

As it turns out, React doesn't understand the . It is required to use Also, do not forget that the view construction will not lead to adding an event listener, but to passing onChange inside the component where it can be obtained by calling props onChange={console.log}onChange={e => console.log(e)}
<Component onChange={e => console.log(e)} />

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question