Skip to content

Examples that pass args to renderRouteHandler are out of date #184

Open

Description

@wbobeirne

The following commit removed the props args from renderRouteHandler: e6806f6

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions