Warning: findDOMNode is deprecated in StrictMode. findDOMNode was passed an instance of Transition which is inside StrictMode

前端 未结 6 1022
一个人的身影
一个人的身影 2020-12-17 08:44

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

6条回答
  •  野趣味
    野趣味 (楼主)
    2020-12-17 09:03

    The setState call looks like it's being written to the wrong place. Make sure it's on the editTodo object:

        handleChange = (event) => {
            this.setState(state => ({
              editTodo: {
                ...state.editTodo,
                title: event.target.value,
              },
            }));
        }
    

提交回复
热议问题