06 2022 档案
摘要:const giftsMapRef = useRef({}) const giftRef = (ele:HTMLElement, giftId:number) =>{ giftsMapRef.current['gift-'+giftId] = ele; } <div className='gift-
阅读全文
摘要:目录 一、类组件的情况下 1、定义父组件(直接使用ref) export default class UserRef1 extends Component { constructor(props) { super(props); this.child = React.createRef(); } f
阅读全文
摘要:1、redux-thunk 安装 (redux-thunk 是一个 Redux的中间件) npm install redux-thunk --save // 或者 yarn add redux-thunk 2、在创建 store 时,使用 redux, redux-thunk 配置 redux-de
阅读全文