react-hooks-runner 介绍
基本使用
export default () => {
const [count, setCount] = React.useState(0);
React.useEffect(() => {
// axios.get()
setTimeout(() => {
setCount(count + 1);
}, 1000);
}, [count]);
return <antd.Button type="primary">{count}</antd.Button>;
};
| |