Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
import {
Route,
Link,
Switch
} from 'react-router-dom';
const Messages = ({ match }) => (
<div>
<ul>
...
</ul>
<Switch>
<Route path={`${match.url}/:id(\\d+)`} component={Message} />
<Route
path={match.url}
render={() => <h3>Please select a message</h3>}
/>
</Switch>
</div>
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.