I was trying to following this example but using v5 of react-router,
React Router v4
import { RouterToUrlQuery } from 'react-url-query';
import Router from 'react-router/BrowserRouter';
ReactDOM.render(
<Router>
<RouterToUrlQuery>
<App />
</RouterToUrlQuery>
</Router>,
document.getElementById('root')
);
But it gives me this error
"No history provided to react-url-query. Please provide one via configureUrlQuery."
I also tried doing this
Not using React Router. If you're not using react-router, you'll need to instantiate the history yourself manually:
import { configureUrlQuery } from 'react-url-query';
import createHistory from 'history/createBrowserHistory';
const history = createHistory();
configureUrlQuery({ history });
Using: react-url-query: v1.4.0 react-router-dom: v5.0.1
I was trying to following this example but using v5 of react-router,
React Router v4
But it gives me this error
"No history provided to react-url-query. Please provide one via configureUrlQuery."
I also tried doing this
Not using React Router. If you're not using react-router, you'll need to instantiate the history yourself manually:
But it resulted in an unexpected behaviour
How to use this library with react-router v5?
Thanks in advance