React-router: there is no "createMemoryHistory" in v4, how to make the router link to a url manually?

Created on 20 Feb 2017  Â·  1Comment  Â·  Source: ReactTraining/react-router

when I use the v3, I can use
const createMemoryHistory= require('react-router').createMemoryHistory; createMemoryHistory.push(url) to make the router link to a url manually,
but now I update react-router to the v4, there is no "createMemoryHistory", so what can I do ? I also need to make the router link to a url manually, without <link>.

Most helpful comment

createMemoryHistory comes from the history library.

import { createMemoryHistory } from 'history'

>All comments

createMemoryHistory comes from the history library.

import { createMemoryHistory } from 'history'
Was this page helpful?
0 / 5 - 0 ratings

Related issues

misterwilliam picture misterwilliam  Â·  3Comments

nicolashery picture nicolashery  Â·  3Comments

imWildCat picture imWildCat  Â·  3Comments

ryansobol picture ryansobol  Â·  3Comments

hgezim picture hgezim  Â·  3Comments