Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Provide params or routeParams to getIndexRoute #3564

Closed
ryancole opened this issue Jun 22, 2016 · 1 comment
Closed

Provide params or routeParams to getIndexRoute #3564

ryancole opened this issue Jun 22, 2016 · 1 comment

Comments

@ryancole
Copy link

I'm using dynamic routing and have a scenario where I'd like to use a particular react component depending on a route param. So for example, if I've got a route like below ...

/:slug

I've like to be able to look at that slug and if it's A then use component A, or if it's B use component B.

Right now, getIndexRoute receives the location param, which does have the current path ... as a string, though. There exists the params and routeParams props that get passed into route components. Could getIndexRoute receive these too, so that we can make more precise logic around the route params?

@taion
Copy link
Contributor

taion commented Jun 22, 2016

This was resolved by #3561.

@taion taion closed this as completed Jun 22, 2016
@lock lock bot locked as resolved and limited conversation to collaborators Jan 21, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants