Paul
Paul

Reputation: 271

React router with multi form steppers

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

Answers (1)

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

Related Questions