connected-react-router
connected-react-router copied to clipboard
typescript compatibility issue
When using it with typescript, it is giving error mentioned below:
Expected 2 arguments, but got 1.ts(2554) index.d.ts(60, 3): An argument for 'action' was not provided. (alias) connectRouter(history: History): Reducer<RouterState, LocationChangeAction> import connectRouter
for this code:
export default createStore( connectRouter(history)(rootReducer), initialState, composedEnhancers );
This looks wrong - connectRouter produces a reducer function which should be combined with other reducers to become part of the rootReducer. Here you are trying to call it - since it’s a reducer, it is complaining about a missing action
Confirmed, I am also running into this issue.
I ended up just ditching this and wrapping my App with <BrowserRouter>
I am having this issue, were any of you able to solve it?