I am using React, TypeScript, ESlint, and TypeScript-ESlint. There are no issues with this.
When I installed Redux, React-Redux, and @types/react-redux, the Redux types are being ignored by TypeScript-ESlint. I also installed and uninstalled @types/redux.
Everything in the Redux API like useDispatch(), useSelector(), combineReducers() throws linting errors for "Unsafe assignment of an any
value."
From the Redux Docs, useDispatch() should work without any special typing.
How can I configure TypeScript-ESlint to work with Redux?
Thanks!
Sometimes, the typescript language server within vs code has a hard time picking up changes to the types. Try to "Reload" it using the command palette or completely restarting vs code.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.