Say I have a component X which renders a text input field + a child component Y. Y uses the text from the input field to render something else.
To get the data, X listens for a change event from the text field, and then grabs its updated content via a ref.
Now as I understand it I can pass the data to child Y in two ways.
1) X stores the new data in its state, so its render method is triggered, and here I pass the data to Y using props like <Y something={data}/>
2) X calls a method on Y by using it ref like this.refs.y.setSomething(data). In this case I don't need to store the data in the state of X.
So apart from storing state in X, what are the reasons to choose one over the other?