- 博客(3)
- 收藏
- 关注
原创 react 使用router 和 ts 进行页面跳转报错
使用react路由器v4和Typescript以编程方式导航时出错:Property 'history' does not exist on type 'Readonly & Readonly<{ children?: ReactNode; }>解决方法:你需要导入import { RouteComponentProps } from “react-router-dom”; RouteComponentProps接口有你正在寻找的道具。例如:import {RouteComp
2021-01-06 11:16:37 1667
原创 react使用antd警告:Warning: findDOMNode is deprecated in StrictMode. findDOMNode was passed an instance
react使用antd警告:Warning: findDOMNode is deprecated in StrictMode. findDOMNode was passed an instance警告内容:Warning: findDOMNode is deprecated in StrictMode. findDOMNode waspassed an instance of Wave which is inside StrictMode. Instead, add aref directly t
2021-01-05 11:40:48 466
原创 react中使用ts配置路由时报错:Could not find a declaration file for module ‘react-router-dom‘
react中使用ts配置路由时报错:Could not find a declaration file for module ‘react-router-dom’原来引入,会报错Could not find a declaration file for module ‘react-router-dom’:import {Router,Route,Switch,Redirect} from 'react-router-dom';解决方法:const {Router,Route,Switch,Redi
2021-01-04 11:56:03 3991 1
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人