id missing form params passed to handler
I feel like I'm missing something basic.
the props.params in my handler does not contain one of the IDs that I need.
One Route looks like:
Route name: 'Baz Editor Route', path: '/foo/:fooId/bar/:barId/baz/:bazId/', handler: BazEditor
for url: /foo/1/bar/1/baz/1, in render for BazEditor, if I console.log this.props.params, I get
{fooId: 1, barId: 1}
instead of what I expected, which would be:
{fooId: 1, barId: 1, bazId: 1}
is bazId suppsed to be passed into the handler? It seems like the entire point, so I assume I missing something basic.
Thanks,
-Will
sweet mother of god, hunt for an hour, post an issue, find it 5 minutes later.
what was the issue?
looks like a ... wait for it ... TRAILING SLASH ???
omg, it was so dumb. Earlier I had been messing around with passing params to subviews to get links to work.
After rechecking my routes definitions, rechecking a bunch of Links() and even reading through a bunch of the source and some 0.6 changes stuff, I finally looked at the parent view and found this gem:
@props.activeRouterHandler(params:@props.params)
Might want to throw an error if you try to override params to activeRouteHandlers. I can't imagine a reason you'd actually want to do this, and you could always pass otherParams:@props.params if you really wanted to.
or just not take them, maybe.
Yeah, ignore passed params + console warning seems reasonable. On par with React's "bro, you need keys for your array" message.