0

I could write something like this in react-router v5 "/user/?type(new|edit|view)/:user_id" and set it to Route path and Route was rending correcty in this cases:

  1. "user/new/51"
  2. "user/edit/12"
  3. "user/view/3"

but NotFound on this (that is not one of this new|edit|view):

"user/create/51"

How to reach this behavvior in react-router v6.

"/user/?type(new|edit|view)/:user_id" this is NotFound for any route now

Drew Reese
  • 165,259
  • 14
  • 153
  • 181

0 Answers0