Important Notice Self based Questions in React
Q1 :: why is prevent default is used ?
It demonstrates how to add an item to a list by using a form element with input and button elements. In this case, a preventDefault is called on the event when submitting the form to prevent a browser reload/refresh. You can try the code yourself with and without the "prevent default".
Q2 ::
Comments
Post a Comment