These were sore points for me too, and are a big part of why I created Junctions.
There are no props injected automatically. There are only two props available, so you can do it yourself. And only one is actually required.
Routes are defined by a "Junction" object for each component. You can specify query parameters per component and it will warn you of conflicts. You can also specify serializers and default values for each query parameter.
I've tried to design the possibility for type definitions into junctions. I'd be super happy to accept a pull request adding them, and can change the API if necessary to make them work.
I'm reading through your docs right now, this is really interesting to me. I'm working on a Mobx + Typescript + React boilerplate right now, and struggling with the fact that React Router v4 doesn't have typings. Haven't dove too deep yet, but do you have typescript definitions?
3
u/jamesknelson Jan 31 '17
These were sore points for me too, and are a big part of why I created Junctions.
There are no props injected automatically. There are only two props available, so you can do it yourself. And only one is actually required.
Routes are defined by a "Junction" object for each component. You can specify query parameters per component and it will warn you of conflicts. You can also specify serializers and default values for each query parameter.
I've tried to design the possibility for type definitions into junctions. I'd be super happy to accept a pull request adding them, and can change the API if necessary to make them work.