I am quite new to React and after going through some tutorials, I was trying the below code of mine.
I made one component, passed props to it from a store, on compo
Unlike in the case of Angular, in React.js you need to update the state manually. You can do something like this:
this.onTodoChange(e.target.value)}
/>
And then in the function:
onTodoChange(value){
this.setState({
name: value
});
}
Also, you can set the initial state in the constructor of the component:
constructor (props) {
super(props);
this.state = {
updatable: false,
name: props.name,
status: props.status
};
}