-
-
Notifications
You must be signed in to change notification settings - Fork 10.4k
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
params.splat being coerced to string before creating URL with transitionTo #317
Comments
I've been using an old fork of ReactRouter in order to support server-rendering until #181/#261 land. This bug has changed in the latest versions of RR. Now, instead of getting
I'm seeing
To get the full path, I'd either have to put the precise number of So, as a workaround (or perhaps intended behavior), I can use @mjackson / @rpflorence, what's the intended behavior here? If |
With a route like this: <Route path="/example/:keyName/*/" /> It should just be: ReactRouter.transitionTo("example", {
"keyName": keyName,
"splat": "grandpa/mom/me"
}); If you had three splats like this: <Route path = "/example/:keyName/*/*/*/" /> Then you'd send an array like in your example. I added another test to show this behavior ca5d813 If I'm misunderstanding, please let me know and I'll reopen. But if you only have one splat, don't send an array of splat values, just send one value :) |
Thanks for the clarification. 😃 |
I have a
transitionTo
call that looks like this:which calls this route:
I expect a URL that looks like this:
Instead, I see this:
I suspect the array is being
toString
ed before processing.The text was updated successfully, but these errors were encountered: