Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

react router dom default params

> As such, to define an optional parameter, you do:
  ```
  <Route path="/to/page/:pathParam?" component={MyPage} />
  ```
> and for multiple optional parameters:
  ```
  <Route path="/to/page/:pathParam1?/:pathParam2?" component={MyPage} />
  ```
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #react #router #dom #default #params
ADD COMMENT
Topic
Name
7+8 =