How to use this site?

* You can switch between 2 transport: axios and fetch

1. Open a network tab in the dev tools
2. Click multiple times on 'send immediate request'
3. See some cancelled requests
4. Click 'Turn lazy load on/off' button to switch the loading behavior. If it's false, the request will not be sent
5. Click multiple times on 'send on-demand request' button
6. See some cancelled requests

Axios

const {value, loading, error} = useAsync(lazyLoading ? null : fetchFn, ['aa', 'bb']);
// lazyLoading:false, value:{"p1":"aa","p2":"bb"}, loading:false, error:null
const {execute, value, error, loading} = useAsync(fetchFn, [], [], false);
// value:null, loading:false, error:null
return ( 
    // ..
    <button onClick={()=>execute(p1, p2)} />
)