![](https://img-blog.csdnimg.cn/20201014180756927.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
react
文章平均质量分 72
LittleRoundFace
永远不变的是改变
展开
-
Warning:useEffect函数中取消所有订阅和异步任务
Warning:Can’t perform a React state update on an unmounted component. This is a no-op, but it indicates a memory leak in your application. To fix, cancel all subscriptions and asynchronous tasks in a useEffect cleanup function.useEffect清理函数中取消所有订阅和异步任务报错:原创 2021-11-23 23:36:35 · 1467 阅读 · 0 评论 -
React基本使用你都掌握了么?
React基本使用你都掌握了么?基本使用——常用,必须会高级特性——不常用,但体现深度,下篇文章会复习【React高级特性】Hooks——常用,必须会,前面已分享过基础【React Hooks基本使用详解】Redux和React-router使用,后续文章也会介绍【Redux和React-router使用】老规矩先来看几个常考的react基础面试题:React典型面试题举例React组件如何通讯JSX本质是什么?context是什么?有什么用途?shouldCompone原创 2021-11-21 00:41:57 · 401 阅读 · 0 评论 -
路由传参方式
路由传参方式1.params方式参数不丢失但是需要一个个手动定义this.props.history.push({pathname:`/detail/${id}`})获取参数this.props.match.params.id路由文件中的配置<Route path="/detail/:id/:orderId?" component={Detail} />1.1 params传参(刷新页面后参数不消失,参数会在地址栏显示)路由页面:注意要配置 /:id<Route原创 2021-11-21 00:44:36 · 918 阅读 · 0 评论