I am trying to use a function as a prop inside a component and this component is a child of another component. But the function is not working.? Can I know why. This is the
The setState call looks like it's being written to the wrong place. Make sure it's on the editTodo object:
setState
editTodo
handleChange = (event) => { this.setState(state => ({ editTodo: { ...state.editTodo, title: event.target.value, }, })); }