{"_id":"@aslan-hooks/use-fetch","_rev":"1-317c65196e057b9fac63f22719997303","name":"@aslan-hooks/use-fetch","dist-tags":{"latest":"1.0.0"},"versions":{"1.0.0":{"name":"@aslan-hooks/use-fetch","version":"1.0.0","main":"index.js","license":"MIT","dependencies":{"@aslan-hooks/use-promise":"^1.0.2"},"devDependencies":{"@babel/cli":"^7.2.3","@babel/core":"^7.2.2","@babel/preset-env":"^7.3.1"},"scripts":{"build":"babel useFetch.js --out-file index.js","prepublish":"npm run build","test":"echo \"Error: no test specified\" && exit 1"},"author":"","description":"A React Hook that takes a promise which will be executed as an effect, with optional watchers","repository":{"type":"git","url":"git+https://github.com/deniztetik/use-fetch.git"},"gitHead":"275af48c78e6e9383d6b79052fd96e08645e61e6","bugs":{"url":"https://github.com/deniztetik/use-fetch/issues"},"homepage":"https://github.com/deniztetik/use-fetch#readme","_id":"@aslan-hooks/use-fetch@1.0.0","_npmVersion":"6.4.1","_nodeVersion":"10.11.0","_npmUser":{"name":"deniztetik","email":"deniztetik31@gmail.com"},"dist":{"integrity":"sha512-Q9AaVrObDb8OHhSmG+e6Jkfyz7JybAW7D5jMAjK4cuFYPlocMRJlIgSYGcU9/VeXFKAlWorL+j5IroWL8VuuMw==","shasum":"bc592bb9a1d2f3fa7aa315b2b7059a6da8969eea","tarball":"https://registry.npmjs.org/@aslan-hooks/use-fetch/-/use-fetch-1.0.0.tgz","fileCount":6,"unpackedSize":109309,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcXHouCRA9TVsSAnZWagAAH8MP/i2DdhPYNUjfwId5AbtJ\n8b5DYtkk4+tdS4L02LkDURxdLqYY2OKYMtSBFin7q8iqqcXJq3fMBC7VvNEF\nu4enJIf0xNjFvBOtOKgWBKeqOmCXnE48h9BIemURqyaFL6Yr4Xcw0Dpf+Kad\nRupe1hUTLx/aZriC6623NQ+HCS/qpjs9x4e5hIXSqNB9fW0avOUwA3q8iwGb\n/oQP0tNZO10Ie6m2PXH8ymprwhXlBbJMVeOvT4oNcaknFcR2P0ftP4jlc3vf\nfRE+ba2//LjZHRVurEIGooGZvdz8lvbXlKR93PfSbVVYel4rD2mgk6NNyq9t\ngVNjwnQQhQr4r02+xN86g493ajzWPlZaEW2tr7srXw6qzLNtcc2FZFrxkRYK\nWocccAe8CBgb8+485CYga2PIvsUKvtx8j23Hed/vFr8aQnzPUzS/Ig/xYO0H\njMb/E33QU+VQuVZQ8wM6RruBz3gouc7ElMEQ4nLTryQIgLDPjqivUIySs5EQ\niC9iPQI/y19v3LzrX3w68RGjvCNXhOGh2NYx4HhueAmdzqSH+GURVeBJlyQ3\nR9h3TbgBjYvG3op3DLGwopFQdSf/osUXBCHdUKcw1azi3qY9Lvo5V04d7EgH\nPXd13utu4X3sa9+GEaQoUNjunJMB29sqNU2dbYPYqqwy2nYrC7J23W/SUGJ6\ndOHX\r\n=n1vg\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDKkxnCxlekjy/IdYp8vjbFJaXdFwKeNsA2bXWkLJ6m5gIgOYblEFIxKP98c8xECK7DCsfbqZtVJj0XpKeI0kURu3U="}]},"maintainers":[{"name":"deniztetik","email":"deniztetik31@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/use-fetch_1.0.0_1549564461686_0.5600012973985204"},"_hasShrinkwrap":false}},"time":{"created":"2019-02-07T18:34:21.507Z","1.0.0":"2019-02-07T18:34:21.800Z","modified":"2022-04-04T15:47:33.577Z"},"maintainers":[{"name":"deniztetik","email":"deniztetik31@gmail.com"}],"description":"A React Hook that takes a promise which will be executed as an effect, with optional watchers","homepage":"https://github.com/deniztetik/use-fetch#readme","repository":{"type":"git","url":"git+https://github.com/deniztetik/use-fetch.git"},"bugs":{"url":"https://github.com/deniztetik/use-fetch/issues"},"license":"MIT","readme":"# use-promise\n\nA React Hook that takes a promise which will be executed as an effect, with optional watchers\n\n## Installation Instructions\n\n`yarn add @aslan-hooks/use-promise`\n\nor\n\n`npm i --save @aslan-hooks/use-promise`\n\n## Usage Instructions\n\n```jsx\nimport React from \"react\";\n\nimport usePromise from \"@aslan-hooks/use-promise\";\n\nconst fakeAPICall = () =>\n  new Promise(resolve => {\n    setTimeout(() => resolve(\"Text\"), 1000);\n  });\n\nconst Component = () => {\n  const [loading, result, error, refresh] = usePromise(fakeAPICall);\n\n  return <div>{loading ? \"Loading...\" : `The result is ${result}`}</div>;\n};\n```\n","readmeFilename":"README.md"}