Lets say I have a serverless website. MyWebSite.com
If a user types MyWebSite.com/randomString
How can I capture this extra random information.
The Goal is to Dynamically Display Content based on users Random Url Search
Lets say I have a serverless website. MyWebSite.com
If a user types MyWebSite.com/randomString
How can I capture this extra random information.
The Goal is to Dynamically Display Content based on users Random Url Search
Try to use react-router-dom instead of react-router
Ok hopefully your route is like <Route path="/:id" component={Search} />, in this case you can get the randomString like follows
in functional component:
props.match.params.id
or in class component:
this.props.match.params.id