Is it possible to use optional parameter for url?
For example path fruits/:id will match the same component if parameter id is not passed;
<Route path="/fruits/:id">
  <Fruits />
</Route>
At the moment to implement it I need to declare two routes fruits:/id and /fruites/ to match the same component.
<Route path="/fruits/:id">
  <Fruits />
</Route>
<Route path="/fruits/">
  <Fruits />
</Route>
 
    