Answer the question
In order to leave comments, you need to log in
How to change useless route repetition?
Here is my piece of code.
<Switch>
<Route exact path="/" component={Home} />
<Route path="/A/xx/xxx/:feeros" component={About} />
<Route path="/B/xx/xxx/:feeros" component={About} />
<Route path="/C/xx/xxx/:feeros" component={About} />
<Route path="/D/xx/xxx/:feeros" component={About} />
</Switch>
<Switch>
<Route exact path="/" component={Home} />
<Route path="/:letter/xx/xxx/:feeros" component={About} />
</Switch>
Answer the question
In order to leave comments, you need to log in
For example:
In fact, it is possible to abstract from specific values as well.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question