{"_id":"@bscop/use-did-update","_rev":"1-b15667ce1003a4199542ee2f6b70805d","name":"@bscop/use-did-update","dist-tags":{"latest":"1.0.0"},"versions":{"1.0.0":{"name":"@bscop/use-did-update","version":"1.0.0","description":"React hook to handle componentDidUpdate lifecycle event.","main":"package/dist/index.js","module":"package/dist/index.es.js","types":"package/src/index.d.ts","scripts":{"badge:coverage":"npm run test:coverage && codecov","prebuild":"rm -rf ./package/dist","build":"rollup -c rollup.config.js","lint":"eslint 'package/**'","prepare":"husky install","prepublishOnly":"npm run build","release":"standard-version","test":"npm run lint && npm run test:types && npm run test:unit","test:debug":"node --inspect $(npm bin)/jest --watch --no-cache --runInBand","test:types":"tsc --noEmit -p package/src","test:unit":"jest --runInBand --coverage"},"repository":{"type":"git","url":"git+https://github.com/brunoscopelliti/use-did-update.git"},"directories":{"src":"package/src"},"keywords":["use-update","use-did-update","react","react hook","react lifecycle","hook use-update","hook use-did-update"],"author":{"name":"Bruno Scopelliti"},"license":"MIT","bugs":{"url":"https://github.com/brunoscopelliti/use-did-update/issues"},"homepage":"https://github.com/brunoscopelliti/use-did-update#readme","devDependencies":{"@babel/preset-env":"^7.14.2","@commitlint/cli":"^12.1.4","@commitlint/config-conventional":"^12.1.4","@rollup/plugin-babel":"^5.3.0","@rollup/plugin-commonjs":"^19.0.0","@testing-library/react-hooks":"^5.1.2","@types/jest":"^26.0.23","@types/react":"^17.0.5","babel-jest":"^26.6.3","babel-plugin-transform-es2015-modules-commonjs":"^6.26.2","codecov":"^3.8.2","eslint":"^7.26.0","eslint-config-bruno":"^3.0.0","eslint-plugin-jest":"^24.3.6","eslint-plugin-react-hooks":"^4.2.0","eslint-plugin-testing-library":"^4.4.0","husky":"^6.0.0","jest":"^26.6.3","rollup":"^2.48.0","standard-version":"^9.3.0"},"peerDependencies":{"react":">=17.0.0","react-dom":">=17.0.0"},"gitHead":"bc14a2c0374335341b911cac68597b8ff0761644","_id":"@bscop/use-did-update@1.0.0","_nodeVersion":"15.9.0","_npmVersion":"7.5.3","dist":{"integrity":"sha512-9j8Ar3vVJfrdrT7VIdTP1eJuzfrsrVVz+VPtQgebwcZeZQ4oBGbvhpMWuW7Z72E02bXqNhJUcuHB8Mf2qAOLNg==","shasum":"def2d98d2f4f1914a7283fe94a8144f25c2c9c9b","tarball":"https://registry.npmjs.org/@bscop/use-did-update/-/use-did-update-1.0.0.tgz","fileCount":9,"unpackedSize":10776,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgpDGjCRA9TVsSAnZWagAAsBIP/RH1/Iy2FMfq7fWH9erv\n/sSGwazEbgc7xcml242F4IJ3BmlBvwQF9xNSoGpSQgWinzV6Kf6FOYG+YPFC\nyt7IEcV6mJ8cju7LkrDMRkaF+EbXtjwe6bFuEwNlVUvmbBDl36FajLBwn5Ii\n5EDs5WpoDkSVewd4WpDYsARulpsbV6FhLK3kp4sKpaCEruIO1Er71gAoSD/O\nFhoss/RX8PWz8Wet4crrR9kH9VbcIVIPk9FQuvD+NN35Se8KD9cucEONGtPW\nctXjPtvS29S5drRIpTg2nMkXQHD30NzLMmjbtew81J96we9rV1ehIn2/CbvK\nN8Rr+JJM2fUSG0T8w6/pAfiBDPJvjCfg/Mm5989LfIq9UFmF68dFlhndy1dM\nzipp6kzBRLuDBs5KsFnnZ+sRax0N0TgijFMnkxs+AUUiZTWvyLfikoe3nTQY\nBtc1WhMz27ha2Eng6SR+zciRYb3auJ10spUs3sWSsbzn4VloqJP8Y/RCzARz\n2GkK95LFZjXnt910gQVPPEe5wR6qZnGqxJ49jAc3F/OkJIRe8Hf3wXFiIs79\nYlBxu7otIEjJZwlU8T8sVJxm8gEy0+KZchZojNIMGu/hcGPVbRzHe1ET/Kxa\nVbONzxqOIpxd5mPrxkEMjrP/GXmcY8HrUuH1KD8yfHNUEo4RclE4zZ8TSSS/\nd2Di\r\n=cciu\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDlieKfsAyOCf84ylFJ/aeNYv/W2XlR4FJdtqDXSsyPAAiEAqlaXCvc8mck8zWYrT1GM4amZD7RULlrNwKJ6MY/CEiQ="}]},"_npmUser":{"name":"brunoscopelliti","email":"bru.scopelliti@gmail.com"},"maintainers":[{"name":"brunoscopelliti","email":"bru.scopelliti@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/use-did-update_1.0.0_1621373346930_0.7192228282449808"},"_hasShrinkwrap":false}},"time":{"created":"2021-05-18T21:29:06.552Z","1.0.0":"2021-05-18T21:29:07.045Z","modified":"2022-04-04T20:50:34.028Z"},"maintainers":[{"name":"brunoscopelliti","email":"bru.scopelliti@gmail.com"}],"description":"React hook to handle componentDidUpdate lifecycle event.","homepage":"https://github.com/brunoscopelliti/use-did-update#readme","keywords":["use-update","use-did-update","react","react hook","react lifecycle","hook use-update","hook use-did-update"],"repository":{"type":"git","url":"git+https://github.com/brunoscopelliti/use-did-update.git"},"author":{"name":"Bruno Scopelliti"},"bugs":{"url":"https://github.com/brunoscopelliti/use-did-update/issues"},"license":"MIT","readme":"# use-did-update\n\n[![GitHub license](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/brunoscopelliti/use-did-update/blob/main/LICENSE)\n[![npm version](https://img.shields.io/npm/v/@bscop/use-did-update.svg?style=flat)](https://www.npmjs.com/package/@bscop/use-did-update)\n[![CircleCI Status](https://circleci.com/gh/brunoscopelliti/use-did-update.svg?style=shield&circle-token=:circle-token)](https://circleci.com/gh/brunoscopelliti/use-did-update)\n[![Coverage](https://img.shields.io/codecov/c/github/brunoscopelliti/use-did-update)](https://app.codecov.io/gh/brunoscopelliti/use-did-update/)\n\nReact hook to handle componentDidUpdate lifecycle event.\n\nThe effects run after every completed render - except the initial one - but it's also possible\nto fire them only when certain values have changed.\n\n## Install\n\n```\nnpm i @bscop/use-did-update\n```\n\n## Usage\n\n```js\nimport useDidUpdate from \"@bscop/use-did-update\";\n\nuseDidUpdate(\n  () => {\n    // Executed after each render, but the first one.\n    console.log(\"Yay, it's updated\");\n  }\n);\n```\n\n### Api\n\n```\nuseDidUpdate(effect, [cleanup], [values]);\n```\n\n- `effect`: the side effect.\n\n- `cleanup`: clean-up logic to execute in case the component is going to be re-rendered.\n\n- `value`: the effect is going to be executed only if also one of these values changed.\n\n## Contribute\n\nRead the [guidelines](./CONTRIBUTING.md).\n\n### Run tests\n\n```\nnpm test\n```\n\n### Coverage\n\nCoverage reports are hosted on [codecov](https://codecov.io/).\n\n```\nnpm run badge:coverage -- --token=<guid>\n```\n\n---\n\nBruno Scopelliti\\\nwww.brunoscopelliti.com\n","readmeFilename":"README.md"}