Андрей Гузюк Андрей Гузюк - 9 months ago 64
React JSX Question

Could not find a declaration file for module 'react-redux'.

Got an issue with typescript and react + redux

Could not find a declaration file for module 'react-redux'. '/home/andrew/miramir/src/js/node_modules/react-redux/lib/index.js' implicitly has an 'any' type.


Trying to get Provider from react-redux

import { Provider } from 'react-redux';


How i can fix it?
Thanks

Answer Source

Fixed with

const { Provider } = require('react-redux');