Path is not types safe
redirect fn doesn't produce any error if you pass path which is not in router with type string
6 Replies
afraid-scarlet•2y ago
not sure I get the problem
you can either pass in a const string literal, or a
string
if you pass in a string, you lose the typesafetyrival-blackOP•2y ago
@Manuel Schiller So ability to receive any
string type is design solution?afraid-scarlet•2y ago
yes
you can use it, but you don't have to
see it as kind of an escape hatch for specific situations
rival-blackOP•2y ago
I'm used to keep all my routes as constants
afraid-scarlet•2y ago
then do that
rival-blackOP•2y ago
got it. thanks