[Feature]: createHref support.
What is the new or updated feature that you are suggesting?
createHref need back.In some scenarios, you need to dynamically calculate the url and then use it.
Why should this feature be included?
In the previous v5 version, I can get the href in the following code.
import { useHistory } from 'react-router-dom'
const Cpt = () => {
const history = useHistory()
return <button
onClick={() => {
const href = history.createHref('/bar')
window.open(`http://some-other-domain.com${href}`)
}}
>
button
</button>
}
But in the latest version, I can't achieve my needs.I just found the resolvePath method.But its result is inconsistent with createHref. And useHref cannot dynamically pass in parameters.

So, I think createHref is still necessary for its existence, or I missed something, there is a better way to achieve it in the v6 version.
Related to #8278
I'm going to convert this to a discussion so it can go through our new Open Development process. Please upvote the new Proposal if you'd like to see this considered!