React router dom with typescript

In this article let’s discuss about React router dom with typescript. Let’s go through the following methods without any delay.

Method 1:

npm install react-router-dom @types/react-router-dom

# Yarn
yarn add react-router-dom @types/react-router-dom

If you are facing any issues with the above approach then try the alternative that is given below. It may look similar by have a try!

Method 2 :

//React router dom for typescript
npm install --save @types/react-router-dom

Hope the above solution works.

Realted Posts : Cordova run device