Created
July 16, 2018 15:18
-
-
Save stephencookdev/67493ec7ea71349004eaeb50f927e75d to your computer and use it in GitHub Desktop.
`SwitchWithSlide` example - hoc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const animateSwitch = (CustomSwitch, AnimatorComponent) => ({ | |
children, | |
}) => ( | |
<Route | |
render={({ location }) => ( | |
<AnimatorComponent uniqKey={location.pathname}> | |
<CustomSwitch location={location}>{children}</CustomSwitch> | |
</AnimatorComponent> | |
)} | |
/> | |
); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment