Skip to content

Instantly share code, notes, and snippets.

@stephencookdev
Created July 16, 2018 15:17
Show Gist options
  • Save stephencookdev/d85f2191c57f573d9f5ecf8e6717f6f8 to your computer and use it in GitHub Desktop.
Save stephencookdev/d85f2191c57f573d9f5ecf8e6717f6f8 to your computer and use it in GitHub Desktop.
`SwitchWithSlide` example - naive usage
render() {
return (
<Route
render={({ location }) => (
<SlideOut uniqKey={location.pathname}>
<Switch location={location}>
<Route path="/a" component={PathA} />
<Route path="/b" component={PathB} />
</Switch>
</SlideOut>
)}
/>
);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment