JavaScript/react
来自康健生活
引言
方法
| React.FC | useEffect | React.StrictMode |
| useRef | 示例 | 示例 |
| 示例 | 示例 | 示例 |
关键字
| ref | 路由 | store |
| 示例 | 示例 | 示例 |
| 示例 | 示例 | 示例 |
脚手架
| umi | 示例 | 示例 |
结构
| 数组 | 示例 | 示例 |
| 示例 | 示例 | 示例 |
| 示例 | 示例 | 示例 |
Component
| displayName | 示例 | 示例 |
| 示例 | 示例 | 示例 |
| 示例 | 示例 | 示例 |
组件设计
| 函数式声明组件 |
| modal | 示例 | 示例 |
| 示例 | 示例 | 示例 |
| 示例 | 示例 | 示例 |
高阶函数
| 高阶函数 | 示例 | 示例 |
| 示例 | 示例 | 示例 |
| 示例 | 示例 | 示例 |
事件
| React.RefObject | React.EventHandler | React.MouseEvent | React.TouchEvent |
| React.forwardRef | React.FunctionComponent | React.MouseEventHandler | |
| 示例 | 示例 | 示例 |
事件处理
| onChange | onClick | event.persist |
| SyntheticEvent | 示例 | 示例 |
| 示例 | 示例 | 示例 |
事件相关
| 事件冒泡 | 示例 | 示例 |
| 示例 | 示例 | 示例 |
| 示例 | 示例 | 示例 |
CSS
hooks
| useCallback | useState | useRef |
| useContext | useReducer | useMemo |
| useEffect | useLayoutEffect |
颗粒
基础颗粒
场景颗粒
算法
| reconciliation | 示例 | 示例 |
| 示例 | 示例 | 示例 |
| 示例 | 示例 | 示例 |
其他
| 自定义参数 | 示例 | 示例 |
| 示例 | 示例 | 示例 |
| 示例 | 示例 | 示例 |
参考
其他
| class | 元素显示隐藏 | 示例 |
| 示例 | 示例 | 示例 |
| 示例 | 示例 | 示例 |
error
- Render methods should be a pure function of props and state; triggering nested component updates from render is not allowed. If necessary, trigger nested updates in componentDidUpdate.
- 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 cleanu.
- 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.
No categories