I have this component:
import React from \'react\';
export default class AddItem extends React.Component {
add() {
this.props.onButtonClick(this.input.
You shouldn't be setting the value of the input through refs.
Take a look at the documentation for controlled form components here - https://facebook.github.io/react/docs/forms.html#controlled-components
In a nutshell
this.setState({value: e.target.value})} />
Then you will be able to control the disabled state by using disabled={!this.state.value}