Reputation: 271
Is it possible to attach react router with steppers? so that when the user clicks next button it also changes the react router url. for example from "mainForm" to "mainForm/contact
Upvotes: 0
Views: 743
Reputation: 1409
You can do that with an anchor in your next button
<a href="/mainForm/contact" />
And react router will do the rest of the job.
If you want to use <Link />
here is an example:
<Link to={"/step" + numberStep}>
<Button renderAs="button">
<span>Login</span>
</Button>
</Link>
Upvotes: 1