supasate / connected-react-router

A Redux binding for React Router v4
MIT License
4.73k stars 593 forks source link

Use history from react-router-dom { useHistory } #404

Open ildevelop opened 4 years ago

ildevelop commented 4 years ago

I work with react-router-dom and wanna use connected-react-router may I use useHistory instead add 2 libraries [ hisrory, react-router ] to my project ?

carlosedof commented 4 years ago

up?

martinezjose commented 4 years ago

I have the same question; we can either import push from connected-react-router, or useHistory from react-router-dom, but what would be considered best-practice?

tibic commented 4 years ago

在home页面,当我在redux里面使用dispath(push('/about'))想切换到about页面。页面url变成了about,但页面home页面没更新。useHistory 查看pathname还是home的,没有变成about。 项目用了history和connected-react-router。 不想写英文,这是为啥呢

boro28 commented 1 year ago

Up?