I can get the value just fine using:
this.refs.myTextArea.getDOMNode().value
Trying to set that does nothing.
I can get the value just fine using:
this.refs.myTextArea.getDOMNode().value
Trying to set that does nothing.
this.refs.myTextArea.getDOMNode().value = "";
In even newer version of React ( > v15 ), you don't need findDOMNode()
, this.refs.myTextArea.value =''
is enough
Is the value of your textarea being bind to a state of your component?
If yes then you can't set value like this, what you should do is call setState
to change it.