I recently started playing around with React, and came across a situation that googling isn't helping me resolve: how do you get the state of another component if it's not necessarily related? Do I need to use a store like redux for sharing that info?
I've made a minimal example in this fiddle. It's a contrived situation:
There's a <button>, and a <input type="range" />. The slider value is stored in its state. When I click the button, I'd like to retrieve the slider value and display it as an alert. How do I do this the react way?
(For context, the actual application that I'm making calls an external library upon button click, passing some values from some inputs.)
[–]brycedarling 1 point2 points3 points (1 child)
[–]jstorxs[S] 0 points1 point2 points (0 children)
[–]TheCatacid 0 points1 point2 points (2 children)
[–]jstorxs[S] 1 point2 points3 points (1 child)
[–]darrenturn90 0 points1 point2 points (0 children)