B
B
bpGusar2019-10-24 17:07:21
JavaScript
bpGusar, 2019-10-24 17:07:21

I have a component, it is large, I break it into subcomponents, is it right to pass this to them in order to change the state of the parent?

I have a component, it is large, I break it into subcomponents, is it right to pass this to them in order to change the state of the parent, or is it better to create handlers?
Why is one better than the other and what is the best way to do it?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Vladimir, 2019-10-24
@Casufi

https://uk.reactjs.org/docs/context.html

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question