I am using BrowserRouter in my React project, but there is a form page where I want to use a Link component to: submit the form and to redirect me to the homepage without reloading the page.
<form onSubmit={handleSubmit}>
/* blablabla */
<Link to={`/homepage`} className="button">
Home
</Link>
</form>
But since the Link is an "a" component I can't make it "type=submit". So my problem is not about how to redirect to homepage, because it works, my problem is that I want to also submit the form.
How can I use the Link React component to redirect to the homepage without reloading the page AND ALSO to submit the form.