This repository has been archived by the owner on Sep 25, 2023. It is now read-only.
Releases: webcarrot/api
Releases · webcarrot/api
v2.0.0
What's Changed
- Bump lodash from 4.17.20 to 4.17.21 in /example by @dependabot in #5
- Bump browserslist from 4.16.0 to 4.16.6 in /example by @dependabot in #6
- Bump path-parse from 1.0.6 to 1.0.7 in /example by @dependabot in #7
- Bump minimist from 1.2.5 to 1.2.6 in /example by @dependabot in #8
- Fixes by @webcarrot in #9
- ESM build by @webcarrot in #12
New Contributors
- @webcarrot made their first contribution in #9
Full Changelog: v1.8.0...v2.0.0
Permission to optionally stop the request
React example:
const Component = ({id}: {id:string}) => {
const api = React.useContext(ApiContext);
const [obj, setObj] = React.useState<SomeType>(null);
React.useEffect(() => {
if (id) {
const request = api("get/obj", {id});
request.then(setObj, console.error);
return () => request.abort();
}
}, [id]);
return obj ? <span>{obj.name}</span> : null;
}
documentation fixs
1.0.3 1.0.3
fixs
Fix npm package
1.0.1 verions in example
Initial release
1.0.0 1.0.0