随笔分类 -  hooks

摘要:react自定义hooks解决内存泄漏销毁组件时,报警告: 解决: utils/hooks.ts export const useFetchState = (...props: any) => { const focus = useRef<any>(null); const [state, setState] = useState(.. 阅读全文
posted @ 2022-04-26 11:17 吴小明- 阅读(363) 评论(0) 推荐(0) 编辑
摘要:hooks封装ConfirmModel弹框1、components/ConfirmModel/index.tsx import React, { useState, useImperativeHandle } from 'react' import { Modal } from 'antd' import styles from './in 阅读全文
posted @ 2022-03-25 22:24 吴小明- 阅读(254) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示