What is preventDefault() in React
React uses synthetic events to handle events from button, input and form elements. A synthetic event is a shell around the native DOM event with additional information for React. Sometimes you have to use event.preventDefault(); in your application. The list component example is taken from this tutorial about state management in React which…