Current names are misleading because these functions don't generate full URLs. Instead, they generate URL parts which are called paths in React Router. There already are buildPath and buildRelativePath functions, but they actually generate pathnames, so they can also be renamed.
These are the possible renamings:
buildUrl => buildPath
buildRelativeUrl => buildRelativePath
buildPath => buildPathname
buildRelativePath => buildRelativePathname
It won't even be a breaking change, because buildUrl can be safely used instead of buildPath.
Current names are misleading because these functions don't generate full URLs. Instead, they generate URL parts which are called paths in React Router. There already are
buildPath
andbuildRelativePath
functions, but they actually generate pathnames, so they can also be renamed.These are the possible renamings:
buildUrl
=>buildPath
buildRelativeUrl
=>buildRelativePath
buildPath
=>buildPathname
buildRelativePath
=>buildRelativePathname
It won't even be a breaking change, because
buildUrl
can be safely used instead ofbuildPath
.