Passing Data to Components

I’m completely incapable of mimicing Mosh in the Passing data to Components episode (E.3 of Composing Components.

Everything exept
state = {
value: this.props.value
}
I get an error that says: Cannot read property ‘value’ of undefined

I’ve checked the value attribute of but there’s nothing wrong.

Did something change in react or something?

It suddenly worked and I have no idea why

Ensure that you have passed the value prop properly

Make the following change in the constructor and it will work

state = {
    value: this.props.value
  };

  constructor(props){
    super(props)
    this.handleIncrement = this.handleIncrement.bind(this);
  }