score:3

Accepted answer

the todoform component takes a property "onsubmit".

that line is simply calling this property (that was passed to it by its parent) and passing in the description ( taken from the state of todoform ).

for example:

<todoform onsubmit={(description) => alert(description)} />

read more about props in react here.


Related Query

More Query from same tag