Antd Hooks

1、useSate

  Demo:

      const [createModalVisible, handleModalVisible] = useState<boolean>(false);

      初始化组件state,类型为布尔类型,初始化参数为false

2、useModel

3、useRef
   const actionRef = useRef<ActionType>();

猜你喜欢

转载自www.cnblogs.com/irobotzz/p/13405375.html