I can't see any test with buildPath() or getPath() called with an non-existent route name. I think it makes sense to return null here, but in higher-level packages like react-router5, this should throw an error:
<BaseLink routeName="badroutename" />
Currently, the underlying <a> element is created with href="null", and I don’t think I’m the only fool who mistypes route names.
(Okay, I probably should have created this issue in react-router5 :upside_down_face:)
I can't see any test with
buildPath()
orgetPath()
called with an non-existent route name. I think it makes sense to returnnull
here, but in higher-level packages like react-router5, this should throw an error:Currently, the underlying
<a>
element is created withhref="null"
, and I don’t think I’m the only fool who mistypes route names.(Okay, I probably should have created this issue in react-router5 :upside_down_face:)