1、useSate
Demo:
const [createModalVisible, handleModalVisible] = useState<boolean>(false);
初始化组件state,类型为布尔类型,初始化参数为false
2、useModel
3、useRef
const actionRef = useRef<ActionType>();
1、useSate
Demo:
const [createModalVisible, handleModalVisible] = useState<boolean>(false);
初始化组件state,类型为布尔类型,初始化参数为false
2、useModel
3、useRef
const actionRef = useRef<ActionType>();