Open hazratgs opened 5 years ago
Hi, I have a cra project on typescript, added the connected-react-router to it, the first step:
`// reducers.js import { combineReducers } from 'redux' import { connectRouter } from 'connected-react-router'
export default (history) => combineReducers({ router: connectRouter(history), ... // rest of your reducers })`
After adding this code, an error occurs: Parameter 'history' implicitly has an 'any' type.
I do not really want to register any, please tell me which type to register there?
Hey there! First, npm i --save @types/history, and then try doing this:
npm i --save @types/history
import { History } from 'history'
Hi, I have a cra project on typescript, added the connected-react-router to it, the first step:
`// reducers.js import { combineReducers } from 'redux' import { connectRouter } from 'connected-react-router'
export default (history) => combineReducers({ router: connectRouter(history), ... // rest of your reducers })`
After adding this code, an error occurs: Parameter 'history' implicitly has an 'any' type.
I do not really want to register any, please tell me which type to register there?