I am creating an app in react using the react template provided by visual studio 2017. I want to make use of react-cookie in my application. I have installed this lib using command
npm install react-cookie
But when i try to import it in my component it gives me the following error on compile time:
import { Cookies } from 'react-cookie';
(TS) Could not find a declaration file for module 'react-cookie'. 'D:/somepath/node_modules/react-cookie/lib/index.js' implicitly has an 'any' type. Try npm install @types/react-cookie if it exists or add a new declaration (d.ts) file containing declare module 'react-cookie'
I tried installing it using
npm install @types/react-cookie
But the console shows me a message that
@types/react-cookie is not in the npm registry. You should bug the author to publish it (or use the name yourself
I am very new to react so maybe i am making a silly mistake. Can somebody help me out as i need to use this library in my project.