When you do not want an event to be captured by any parent or child handlers, you can use the method ________.

  • blockEvent()
  • haltEvent()
  • preventPropagation()
  • stopPropagation()
When you do not want an event to be captured by any parent or child handlers in React, you can use the method stopPropagation() on the event object. This method prevents the event from bubbling up or propagating further in the DOM hierarchy, ensuring that only the intended event handler is called.
Add your answer
Loading...

Leave a comment

Your email address will not be published. Required fields are marked *