App useRouter router.replace doesn't accept url objects?
Answered
Singapura posted this in #help-forum
SingapuraOP
Why don't the functions for the router accept url objects in the app router?
Answered by Giant panda
You can always write a custom util function that maps an object to a string or just do it manually using pathname and
URLSearchParams10 Replies
SingapuraOP
error
Giant panda
Because the API changed and the new router functions take a string.
SingapuraOP
what a pointless change 🤣
SingapuraOP
yeah ik
is there a way to make it like that then
cause strings are so jarring to handle
Giant panda
You can always write a custom util function that maps an object to a string or just do it manually using pathname and
URLSearchParamsAnswer
SingapuraOP
alright thanks what an odd change ¯_(ツ)_/¯