I
I
ivanovdev6662020-08-21 13:09:21
React
ivanovdev666, 2020-08-21 13:09:21

How to fix "React does not recognize the prop on a DOM element" error?

Clicking on the ADD button gives the following error

Answer the question

In order to leave comments, you need to log in

1 answer(s)
T
t800zippygod, 2020-08-21
@ivanovdev666

This error can appear due to the fact that you are passing props directly from one component to another. For example, in your handleAdd function, when called on a child component, it refers to the props of the parent. React swears at such logic, since props belong to the internal state of each component and should not be mutated from the outside.
Try Destructuring

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question