react-router-component
react-router-component copied to clipboard
Examples that pass args to renderRouteHandler are out of date
The following commit removed the props args from renderRouteHandler: https://github.com/STRML/react-router-component/commit/e6806f6b4f621e0a9abcecdcfbec4443ec6f0812
However, you can see that it's still used in examples here, here and here. These examples no longer work, which left me scratching my head for AnimatedLocations.jsx for a little while. I was able to replace that with:
const handler = React.cloneElement(this.renderRouteHandler(), {
key: this.state.match.path,
});
return (
<CSSTransitionGroup { ...this.props } { ...props }>
{handler}
</CSSTransitionGroup>
);
The examples here, and possible in https://github.com/STRML/react-router-component-transition should be updated to work.