BrowserRouter in react with typescript

前端 未结 2 496
野趣味
野趣味 2021-01-26 12:16

I have simple application in Reactjs + type script. I\'m trying to use the BrowserRouter from react-router-dom.

This is my code :

import * as React from          


        
2条回答
  •  广开言路
    2021-01-26 12:44

    It seems to be Typings problem,

    If you are using TypeScript 2.4.1, make sure you are using those versions of @types react.

    "@types/react": "15.0.35",
    "@types/react-dom": "15.5.1",
    

提交回复
热议问题