Answer the question
In order to leave comments, you need to log in
How to change the state of the "parent" component in react?
Hello everyone
I just started to learn react, I haven't fully understood what there is a component, etc. . The bottom line is this, I want to make a carousel slider.
Here is the code codepen.io/anon/pen/bgbXoE The
handler hangs on the button to the right onClick={this.toRightSlider}>
I want to change the state of the "parent" component Images according to it. But it does not change in any way, and then I discovered that I can’t reach external functions outside of var Buttons at all.
How would all the same, by clicking on the buttons to the right / left, the positionSlider state of Images would change?
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question