Answers for "prevent refresh react"

1

prevent a page from refreshing in react

function onLinkClick(e) {
   e.preventDefault();
   // further processing happens here
}

<a href="/my-invoice-link" onClick={onLinkClick} />
Posted by: Guest on July-09-2021
1

prevent refresh react

function handleSubmit(event) {
      event.preventDefault();
    }


	<form onSubmit={handleSubmit}></form>
Posted by: Guest on July-23-2021

Code answers related to "Javascript"

Browse Popular Code Answers by Language