JavaScript/react
来自康健生活
引言
方法
| React.FC | useEffect | React.StrictMode |
| useRef | 示例 | 示例 |
| 示例 | 示例 | 示例 |
关键字
| ref | 路由 | 示例 |
| 示例 | 示例 | 示例 |
| 示例 | 示例 | 示例 |
脚手架
| umi | 示例 | 示例 |
结构
| 数组 | 示例 | 示例 |
| 示例 | 示例 | 示例 |
| 示例 | 示例 | 示例 |
Component
| displayName | 示例 | 示例 |
| 示例 | 示例 | 示例 |
| 示例 | 示例 | 示例 |
组件设计
| modal | 示例 | 示例 |
| 示例 | 示例 | 示例 |
| 示例 | 示例 | 示例 |
事件
| React.RefObject | React.EventHandler | React.MouseEvent | React.TouchEvent |
| React.forwardRef | React.FunctionComponent | React.MouseEventHandler | |
| 示例 | 示例 | 示例 |
事件处理
| onChange | onClick | event.persist |
| SyntheticEvent | 示例 | 示例 |
| 示例 | 示例 | 示例 |
事件相关
| 事件冒泡 | 示例 | 示例 |
| 示例 | 示例 | 示例 |
| 示例 | 示例 | 示例 |
参考
- https://reactjs.org/docs/events.html#mouse-events
- https://fettblog.eu/typescript-react/events/
- https://docs.microsoft.com/en-us/javascript/api/office-ui-fabric-react/positioningcontainer?view=office-ui-fabric-react-latest
- https://reactjs.org/docs/handling-events.html
其他
| 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.
No categories