{"_id":"reusable","_rev":"25-cabb1debf9bb28b1cfdbfb910bb9f5b9","name":"reusable","description":"Reusable is a library for state management using React hooks","dist-tags":{"latest":"1.1.0","next":"1.0.0-alpha.15"},"versions":{"0.0.1":{"name":"reusable","version":"0.0.1","description":"Highly reusable CSS classes.","main":"index.html","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"keywords":["atomic css","OOCSS","reusable css"],"author":{"name":"Brian Zelip"},"license":"MIT","gitHead":"c8e5f5aaffbfe5ca6dfa60e7e9287101743193a9","_id":"reusable@0.0.1","_shasum":"71efd385daf83293ee33325daa4c507f5cce8d37","_from":".","_npmVersion":"3.5.2","_nodeVersion":"0.12.4","_npmUser":{"name":"bzelip","email":"bzelip@gmail.com"},"dist":{"shasum":"71efd385daf83293ee33325daa4c507f5cce8d37","tarball":"https://registry.npmjs.org/reusable/-/reusable-0.0.1.tgz","integrity":"sha512-BNqEk1eEIRZ/hsMMYpnkhdb2qr8ZRQZqVYuPaMLK3BWtBaWomizEtSg6Gsfs+xCVEExcRLDsjwNY36nGOuMtPw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDyDCDf7kidb80Hi3QcrqEwv0eyy/l01uuiiCrUbeVPOAiEArT5/3vGyuU7g6D5zN1HNHBBkqlo3oOdDrG2IKQ5IIZw="}]},"maintainers":[{"name":"bzelip","email":"bzelip@gmail.com"}],"directories":{}},"0.0.2":{"name":"reusable","version":"0.0.2","description":"Library of highly reusable CSS classes for design, performance, and maintainability.","main":"index.html","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"keywords":["atomic css","functional css","OOCSS","reusable css"],"author":{"name":"Brian Zelip"},"license":"MIT","homepage":"https://reusablecss.github.io","repository":{"type":"git","url":"git+https://github.com/reusablecss/reusablecss.github.io.git"},"gitHead":"39757f1f46c4c2afefcb9983054254fc6d4c6d31","bugs":{"url":"https://github.com/reusablecss/reusablecss.github.io/issues"},"_id":"reusable@0.0.2","_shasum":"d1ef9491a09c8d2c251ff25d3adf1f8a60b764d0","_from":".","_npmVersion":"3.5.2","_nodeVersion":"0.12.4","_npmUser":{"name":"bzelip","email":"bzelip@gmail.com"},"dist":{"shasum":"d1ef9491a09c8d2c251ff25d3adf1f8a60b764d0","tarball":"https://registry.npmjs.org/reusable/-/reusable-0.0.2.tgz","integrity":"sha512-lYlVgrikNRWs+QW+BCPpdqtMcXD9IOTp1XptuTHMJVaB4sIHlL0K9st2d21XxtIIdzsjyJQBr0vtSmsTLzu9Uw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGhkybtXIds6Sh9R8HzB4XWob/lg1/ZLG/kgzyyges7dAiEAothSYNhXIcQDilEzix/zqh3vlF3oFFbv6RF6+O6ylDI="}]},"maintainers":[{"name":"bzelip","email":"bzelip@gmail.com"}],"directories":{}},"1.0.0-alpha.1":{"name":"reusable","version":"1.0.0-alpha.1","description":"Reuse is a library for reusing state between React components.","keywords":[],"main":"dist/reuse.js","source":"src/index.js","module":"dist/reuse.mjs","unpkg":"dist/reuse.umd.js","dependencies":{},"peerDependencies":{"react":">= 16.8","react-dom":">= 16.8"},"devDependencies":{"@babel/core":"^7.4.0","@babel/preset-env":"^7.4.2","@babel/preset-react":"^7.0.0","concurrently":"^4.1.0","jest":"^24.5.0","lodash":"^4.17.11","microbundle":"^0.11.0","parcel":"^1.12.3","react":"^16.8.5","react-dom":"^16.8.5"},"scripts":{"example":"parcel ./example/index.html --out-dir exampleDist","build":"microbundle --jsx React.createElement","build:dev":"microbundle watch --jsx React.createElement","dev":"concurrently \"npm run build:dev\" \"npm run example\"","test":"jest"},"browserslist":[">0.2%","not dead","not ie <= 11","not op_mini all"],"gitHead":"449d61d6b4b5278d625365bcf7567e896022d7d1","_id":"reusable@1.0.0-alpha.1","_nodeVersion":"11.12.0","_npmVersion":"6.7.0","dist":{"integrity":"sha512-3ywka/BPhtwnjkQay6/8Tq4LtI24QOZw4PlWEjdCgSvRowYASIC6+uKIQKlvAO2lKOl0VCr0U1XbbPalg/Wn1w==","shasum":"466213ce82862e17b0591fe088fee4b58013655a","tarball":"https://registry.npmjs.org/reusable/-/reusable-1.0.0-alpha.1.tgz","fileCount":27,"unpackedSize":82119,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcnJLwCRA9TVsSAnZWagAACnwQAJqo5bY8Psw7d8CMX/HJ\nqor3C04bI6mW9nz/GTi4OxA7q91BSkZO/tnVDPn6c6vq1i+UH0FgYrztPRPV\nuTuCCvVseERqGsmU5B958Nvr0m3CTKXNIfLvMYsZyLV+vqhDGJv2+Bw0GTOu\nTM0scbi4znV5tcjXQIEBcTmUm8TMhpfhLsbMsiReO+af1VYG7cdaC9Gl/uXu\nEn53J7as2+N1sW71EvG6Bxt3lXDJdlBdCXZ069NTV/W+dm59fj8EGrs7GAtH\nUo3gkoxiUGaHEHWRHCWmARJFUa0PI3ehLc8NTEyNN/glAqhb61fvQcnjS6vZ\nt1WURz5gqkJItmXE81OZ1LBCvaj70RYBCNk/6+uVrjM0y0qCVcBL6Ul5Oy0h\nANGKHu0oWQ8YUm0f7JWUSnDg7Mjh+/i0jWq/D/F8v5HKqRsApdVXCpq3hNkv\nYyQwh/7cos4O1ZWnRLnCvjbarSdW8CMD65MB9toH9BZrt0KJ2MffpZmCrYip\nRz8lncy8EeaAfaubqXAEghfoRB/BWvv5+9daxQwdpXVGATxauFF7+fMsyWJl\nN3Y9gM+bOffWN/u83yasPwVfCts9O/K6GosJGhv3tvJrppwl6WicU7bWM6vD\n9ywqZ+P6mTfEf3IHoSJxQX2dQ6joepbTzgJezkfu/Rk7auBiP1O1V/yD/kLr\np6AR\r\n=5BwQ\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDpuvxjlTtrzSjGMYJubHL+SG38kMy3PvzXph9ebESzGQIgbeC+RG1gajsAIsFEetbI3P2KiTFjyjkNh6hESdVXulI="}]},"maintainers":[{"email":"maayan@glikm.com","name":"morsdyce"}],"_npmUser":{"name":"morsdyce","email":"maayan@glikm.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/reusable_1.0.0-alpha.1_1553765103564_0.6460229422192665"},"_hasShrinkwrap":false},"1.0.0-alpha.2":{"name":"reusable","version":"1.0.0-alpha.2","description":"Reusable is a library for reusing state and business logic between components.","keywords":[],"main":"dist/reuse.js","source":"src/index.js","unpkg":"dist/reuse.umd.js","dependencies":{},"peerDependencies":{"react":">= 16.8","react-dom":">= 16.8"},"devDependencies":{"@babel/core":"^7.4.0","@babel/preset-env":"^7.4.2","@babel/preset-react":"^7.0.0","concurrently":"^4.1.0","jest":"^24.5.0","lodash":"^4.17.11","microbundle":"^0.11.0","parcel":"^1.12.3","react":"^16.8.5","react-dom":"^16.8.5"},"scripts":{"example":"parcel ./example/index.html --out-dir exampleDist","build":"microbundle --external all --jsx React.createElement","build:dev":"microbundle watch --external all --jsx React.createElement","dev":"concurrently \"npm run build:dev\" \"npm run example\"","test":"jest"},"browserslist":[">0.2%","not dead","not ie <= 11","not op_mini all"],"readme":"## What?!\n\nReusable is a library for reusing state and business logic between components.\n\n## Should I use this now?\n\nThis is a very early stage alpha\nIf you want to start experimenting with it and share feedback - yes\nIf you need it for a production app - no\n\n## Why?\n\nReusable solves the problems that state management is meant for, with a simple and clean API, inspired and based on React hooks API.\n\nReact hooks introduced new ways of thinking about state and side-effects.\nThese new ways made old habits obsolete, and require a new type of state management tool that embraces the same concepts:\n\n- Separation of concerns\n- Reusability\n- Composability\n- Simplicity\n\nWhile still providing the developers with structure and architecture with large-scale apps in mind.\n\n## Features\n\n- managing shareable state\n- handling side effects\n- memoization\n- reactive (subscription)\n\n## Design guidelines\n- immutability\n- reusability (duh)\n- performance\n- predictability\n- encapsulation (for shared libraries / lazy loading)\n- gradually adoptable\n\n# Usage Guide\n\n## Basic Usage\n```javascript\n// reusables/counter.js\nimport { reuseState } from \"reusable\";\n\nexport const counter = () => reuseState(0);\n```\n\n## React Integration\n```javascript\n// App.js:\nimport { ReuseProvider } from \"reusable/react\";\n\nconst App = () => (\n  <ReuseProvider>\n    ...\n  </ReuseProvider>\n);\n\n// component #1:\nimport { useReusable } from \"reusable/react\";\nimport { counter } from \"./reusables/counter\";\n\nconst CompOne = () => {\n  const [counter, setCounter] = useReusable(counter);\n\n  return ...\n}\n\n// component #2:\nimport { useReusable } from \"reusable/react\";\nimport { counter } from \"./reusables/counter\";\n\nconst CompTwo = () => {\n  const [counter, setCounter] = useReusable(counter); // Yup, same counter\n\n  return ...\n}\n```\n## Compound State\n\n```javascript\n// reusables/counterState.js:\nimport { reuseState } from \"reusable\";\n\nexport const counterState = () => {\n  const [counter, setCounter] = reuseState(0);\n  const [step, setStep] = reuseState(0);\n\n  return {\n    counter,\n    step,\n    setStep,\n    increment: () => setCounter(val => val + step),\n    decrement: () => setCounter(val => val - step)\n  }\n}\n\n// component:\nimport { useReusable } from \"reusable/react\";\nimport { counterState } from './reusables/counterState';\n\nconst Comp = () => {\n  const counterState = useReusable(counterState);\n\n  return ... // Just use it!\n}\n```\n\n## Using a Reducer\n// TBD\n\n## Compound selectors, memoizing:\n// TBD\n\n## Reusable components / NPM libraries:\n// TBD\n\n## Time Travelling, Undo/Redo\n// TBD\n\n## Using without a SPA (vanilla)\n// TBD\n\n# Commonly asked questions\n\n## What about Context API?\n\nThe answer is pretty much the same for people asking about \"Redux vs. Context API?\"\nUsing Context API directly gives a simple API to share state between components, but it doesn't provide other benefits that reuse provides, such as:\n\n- Time Travelling\n- Single Store\n- Compound Selectors\n- Structure\n- Easily reuse code that needs state management using custom hooks\n- Easily provide open source components that allow control of state\n\n## Is Reusable designed for large apps?\n\nReuse is built with large-scale apps in mind.\nThis is what affected most of the considerations when designing the solution:\n\n- The benefits of a single store and immutable data:\n  - Allow a maintainable architecture and prevent tangled cross-stores access\n  - Easier to reach deep UI states during development by overriding initial state\n  - Easier to achieve undo/redo, state persistence\n- The ability to do code reuse using custom hooks to prevent code duplication\n- Supporting Redux DevTools for better debugging & QA\n- Support lazy-loaded modules\n\n# Feedback:\n\nhttps://goo.gl/forms/Jza0XsM7F3shvWhD2\n\n# What's missing:\n\n- Support lazy-loaded modules\n- Tests\n- DevTools integrations\n- Docs\n- More Examples\n- Time Travelling\n- TypeScript Support\n","readmeFilename":"README.md","gitHead":"c8eb6d03e459791d6f97d3a93359584a9e596a80","_id":"reusable@1.0.0-alpha.2","_nodeVersion":"11.13.0","_npmVersion":"6.7.0","dist":{"integrity":"sha512-5NE9ymomL4S4OCjZqgifuXDJSAqZooKZRJD1qFYJLucIQD8y9u3HAY7PLGzwyEmOpcmcvy+ZRU2n6WPG82z2FA==","shasum":"c83e753918da90b33ac005fb2b7174d523e0f76b","tarball":"https://registry.npmjs.org/reusable/-/reusable-1.0.0-alpha.2.tgz","fileCount":27,"unpackedSize":81356,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcpyzwCRA9TVsSAnZWagAA9t4P/0wjlq+ihIqbSu5+71L8\nB3TdT7rGOLpPbXT3jK1ojG9hXwWim62CyzFSHXiv39Go1v4o5BiOInsSV8Ri\nUfBdy32KLQiJCy/XrlHbViSCTxthndjEE1H0swufATTGg+oAl7o3esJakXoR\nsqpxEQjpFXPULSgsS2MG5A0lgL/GKBbdF505j9GQIVKyUtHPa19W7j7XZliR\nH0kGix4Ij3asT4nBe4KKHLb1RXYgAkYueRBmwCtheCrPuLgIgPPGhK5eK6pv\nmkgPh5cllFjtQgagaUWb8I1FGuNJXWXhewVWpku7NY25rLumXeF7Yx7xFx/5\nMF9JAaATiI1tf7KfIu86h8UpitBJN3ZxhcjxLXl7oJVjSJeEnwpo4td9tYKU\n2+PXLrKgvXDTtOGz1FFW282IjGDv+ASDBQn0/zk+Nua2TlDgxlsy0KunYgod\ncUSPBEuT+kJXneHMOdQvOhNICv4dA61K607IKFpRH5U7gw08aZUlpeLE+8Hh\n1vzqRtN0MYwBxUPhEoCFOVgRpI3Ymw6qhYmf8AaKJfn6Q5GkSKecks5TnYH8\nviwmD8FpQWQwK2liqLNk/9LRaIJ4hllwC6cZB76JvFxoaAShLrFZJyPX6qmf\n1QgScMyUxUhLOUmhNhjaKSIMz60ooVGnTt6119IAo7GVpQrIZp4LkkXYtTUp\nkyRa\r\n=5bTw\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIAQOCyJEIAXS1q1GzU2jssH2mVV0XA1vSt4JTk9xKyVPAiEAsnbhURl9OAPYmEiEoCpxfheLZG+a4eMtHlJUSb3uXao="}]},"maintainers":[{"email":"maayan@glikm.com","name":"morsdyce"}],"_npmUser":{"name":"morsdyce","email":"maayan@glikm.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/reusable_1.0.0-alpha.2_1554459887969_0.49937520110892697"},"_hasShrinkwrap":false},"1.0.0-alpha.3":{"name":"reusable","version":"1.0.0-alpha.3","description":"Reusable is a library for reusing state and business logic between components.","keywords":[],"main":"dist/reusable.js","source":"src/index.js","unpkg":"dist/reusable.umd.js","dependencies":{},"peerDependencies":{"react":">= 16.8","react-dom":">= 16.8"},"devDependencies":{"@babel/core":"^7.4.0","@babel/preset-env":"^7.4.2","@babel/preset-react":"^7.0.0","concurrently":"^4.1.0","jest":"^24.5.0","lodash":"^4.17.11","microbundle":"^0.11.0","parcel":"^1.12.3","react":"^16.8.5","react-dom":"^16.8.5"},"scripts":{"example":"parcel ./example/index.html --out-dir exampleDist","build":"microbundle --external all --jsx React.createElement","build:dev":"microbundle watch --external all --jsx React.createElement","dev":"concurrently \"npm run build:dev\" \"npm run example\"","test":"jest"},"browserslist":[">0.2%","not dead","not ie <= 11","not op_mini all"],"gitHead":"ed1f15f2d37fc6ccf3de525b56e0979cb1984877","_id":"reusable@1.0.0-alpha.3","_nodeVersion":"11.11.0","_npmVersion":"6.7.0","dist":{"integrity":"sha512-gXzJb+5usa6pHNzu4pTlGWeSOFQW2L8wy59HcabbjfTGB8mvTc3+TeVrK4Fj0kGYHPzAvD0DWABy4FgNOUuegQ==","shasum":"6b0cbb01c96a8b9f7d68417cb700bb0b62fee757","tarball":"https://registry.npmjs.org/reusable/-/reusable-1.0.0-alpha.3.tgz","fileCount":28,"unpackedSize":136436,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcp2DyCRA9TVsSAnZWagAABs4QAKApaOCxwE9jq03Mqjaw\nwcTw1NYTQz53ncJ8fhu/zp3dgEhppY9jSHWKC8kpbNDIqiyaVG9V7oEQtm7R\nisBgHcwDuuqHyNG6VMJTsoSE2f5twSlyZiiLtgJtvvV0bwEZEki/aLoDuwPt\nwmH0xHMc29l7n1rXmLXsYN4c2/jGyKom3bGkNmIgz9Gyjj/ib0XiXvZ9XDWK\nBZVRTtq519NtQIyWGpuF2s1dwO95UPm4v6E89XJI9IgZwMt6RhsOqZ0M6/WU\nywtl1t8Yykzpeez7b0xX/9l4/VBk3lHxH626/YIDWMm+5meTlcPwQUw+wIZU\nESvdMrB2tVN/aHNx+UnFQfiWp7FWgSw1XdfaTB8ZvNsZ06A0H73587eHDpxz\nYzvFpa1MspECDVsvUnnHtqyOzwms9ozxuA3btAeofjyh7faHFU/gFJEvVlhi\n+1NsG0ef9qNV/ksLcmSU2TVns4wh+ppyR3CjKAHz2LJ3uTtVRjLcftoBUzhM\nI7rtgbj/GovrWtjJMKJBGmq6Bk9/eLfGH32c9C9Ik+pNbbBZ4Kf9RZhBF7Wo\nGuaLR4sg3sg9j6gjGKYCLBTwgrv13vEcaz3XSVhhLopbg0NlPrdrdK6mdDsW\ns+FsoKnr0rZQzxoshrtbcTaWm1gOuuOeA2ajZk6yV3JP7djOcRi86/eh17hn\n7nRJ\r\n=bZ3+\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQC+14z5HVUvIsyC+Nipgx0sJStc+4Fj7qAkHu3SfhpWBwIhALHCn64z4xDsuRFO5zJA6TCyHusM5AeWzSe0d4FkIi2s"}]},"maintainers":[{"email":"maayan@glikm.com","name":"morsdyce"}],"_npmUser":{"name":"adamklein","email":"adamklein.mail@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/reusable_1.0.0-alpha.3_1554473201499_0.842039645304556"},"_hasShrinkwrap":false},"1.0.0-alpha.4":{"name":"reusable","version":"1.0.0-alpha.4","description":"Reusable is a library for reusing state and business logic between components.","keywords":[],"main":"dist/reusable.js","source":"src/index.js","unpkg":"dist/reusable.umd.js","dependencies":{"@babel/helper-module-imports":"^7.0.0","babel-plugin-reusable":"^1.0.0-alpha.3"},"peerDependencies":{"react":">= 16.8","react-dom":">= 16.8"},"devDependencies":{"@babel/core":"^7.4.0","@babel/preset-env":"^7.4.2","@babel/preset-react":"^7.0.0","babel-plugin-macros":"^2.5.1","babel-plugin-tester":"^6.0.1","concurrently":"^4.1.0","jest":"^24.5.0","lodash":"^4.17.11","microbundle":"^0.11.0","parcel":"^1.12.3","prettier":"^1.16.4","react":"^16.8.5","react-dom":"^16.8.5"},"scripts":{"example":"parcel ./example/index.html --out-dir exampleDist","build":"microbundle --external all --jsx React.createElement","build:dev":"microbundle watch --external all --jsx React.createElement","dev":"concurrently \"npm run build:dev\" \"npm run example\"","docs:publish":"cd website && npm run build && npm run publish-gh-pages","docs:dev":"cd website && npm start","test":"jest"},"readme":"## What?!\n\nReusable is a library for reusing state and business logic between components.\n\n## Should I use this now?\n\nThis is a very early stage alpha\nIf you want to start experimenting with it and share feedback - yes\nIf you need it for a production app - no\n\n## Why?\n\nReusable solves the problems that state management is meant for, with a simple and clean API, inspired and based on React hooks API.\n\nReact hooks introduced new ways of thinking about state and side-effects.\nThese new ways made old habits obsolete, and require a new type of state management tool that embraces the same concepts:\n\n- Separation of concerns\n- Reusability\n- Composability\n- Simplicity\n\nWhile still providing the developers with structure and architecture with large-scale apps in mind.\n\n## Features\n\n- managing shareable state\n- handling side effects\n- memoization\n- reactive (subscription)\n\n## Design guidelines\n- immutability\n- reusability (duh)\n- performance\n- predictability\n- encapsulation (for shared libraries / lazy loading)\n- gradually adoptable\n\n# Documentation\n(https://reusablejs.github.io/reusable)[https://reusablejs.github.io/reusable]\n\n# Commonly asked questions\n\n## What about Context API?\n\nUsing Context API directly, introduces a few challenges. Deciding where in the component tree to put a certain Context is tricky, and also might change while building your app. It forces you to couple the data tree with the component tree.\nReusable tries to solve these issues by decoupling the reusable state from the component tree, and by providing other benefits, such as:\n- Time Travelling\n- Single Store\n- Compound Selectors\n- Structure\n\n## Is Reusable designed for large apps?\n\nReusable is built with large-scale apps in mind.\nThis is what affected most of the considerations when designing the solution:\n\n- The benefits of a single store and immutable data\n- The ability to do code reuse using custom hooks to prevent code duplication\n- Supporting DevTools for better debugging & QA\n- Support lazy-loaded modules\n\n# Feedback:\n\nhttps://goo.gl/forms/Jza0XsM7F3shvWhD2\n\n# What's missing:\n\n- Tests\n- DevTools\n- Docs\n- More Examples\n  - lazy-loaded modules example\n  - API requests\n  - Keyed states\n  - 3rd party\n- Time Travelling\n- TypeScript Support\n- Better error messages","readmeFilename":"README.md","gitHead":"b7b3fe4ab9f5fc49f67296306554ad54dc741089","_id":"reusable@1.0.0-alpha.4","_nodeVersion":"11.13.0","_npmVersion":"6.7.0","dist":{"integrity":"sha512-VsRzbTITZpl7s8w8Hfbp9/h8qh85wLn8wSUC0ISIswUSGza8Ughwtt+LcCmSDfMC4Nw5dDDIVdZt6girlguxVQ==","shasum":"e5a81c03211753afd896261057ed51b6faa83ee8","tarball":"https://registry.npmjs.org/reusable/-/reusable-1.0.0-alpha.4.tgz","fileCount":16,"unpackedSize":143304,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcrkMhCRA9TVsSAnZWagAAhY8QAISDnkD16+eHshVTU3gA\nnHAze8igR0kg4uvEVkHgGlNrl1fpIffNlq/lNTemtma/m9+77XOwgSlLSLA3\nRPnOpiFqAqZWbfVfoMJAcDLdaPL9497H/008AYPjLwrg1cu7rCujpeLqj/Ko\nxebz4v2Kp5qSCG//iOCj9LE3ZlSurLi0EvbgN/SNtWyYuH1TRV5KqM5X6Uls\nWVrYycTTFhDWXrLR7jqkKz+IzxLOQnGIasXzF/3hvzSoP1VfeqNTx6flxh5+\n0eXMV2fFV7WLrKwM+6b0kKhQHp4dmPKuTVdud33ZaDDRjsh8WVhP8zURzAXv\nldyIjafEbRVVVHCRCixe7Sec2AhYaPaCWWG0DlKiuWn0j77OZdoG9a7pKlFD\n+cUst8xYcab5d/XLzDgfGo2b/LhyDHRsRnQUY5HZnyUr5qUK8gh3vkNG8UXS\nJ2ZoDmp4TqNSDeDl2Mb2qegoV9s/GaZK6Dq2z1Ipb0wMdL7hx/QWabg3mf8H\numTk/OXkIiKtswrgwQmolB8Mxz8qEuIfDtF86BOHge6ePhQvLRBQSy4RB5ok\nzQh02c8Vhwn1cDkwk7MrRv5XWD0FmE08/mnOX17ENSZO4TDfejBTPZ43uyv1\nAP9jprjnQBnCMeRbw8FDvNAkl6hG9n/YTRakJPZW2fx8brJ0zM99Nt3eJwwA\nX7z6\r\n=HF4v\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIA+tdWS2kaEqTD+0HVPxWJh6pd2OsCD+rIpCaHTWLsdxAiEAhlB+rzl4cybowSD+mMGt5vQG01IMc0SMGyTU2IhVVbg="}]},"maintainers":[{"email":"maayan@glikm.com","name":"morsdyce"}],"_npmUser":{"name":"morsdyce","email":"maayan@glikm.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/reusable_1.0.0-alpha.4_1554924321032_0.2127851828611469"},"_hasShrinkwrap":false},"1.0.0-alpha.5":{"name":"reusable","version":"1.0.0-alpha.5","description":"Reusable is a library for reusing state and business logic between components.","keywords":[],"main":"dist/reusable.js","source":"src/index.js","unpkg":"dist/reusable.umd.js","dependencies":{"@babel/helper-module-imports":"^7.0.0","babel-plugin-reusable":"^1.0.0-alpha.3"},"peerDependencies":{"react":">= 16.8","react-dom":">= 16.8"},"devDependencies":{"@babel/core":"^7.4.0","@babel/preset-env":"^7.4.2","@babel/preset-react":"^7.0.0","babel-plugin-macros":"^2.5.1","babel-plugin-tester":"^6.0.1","concurrently":"^4.1.0","jest":"^24.5.0","lodash":"^4.17.11","microbundle":"^0.11.0","parcel":"^1.12.3","prettier":"^1.16.4","react":"^16.8.5","react-dom":"^16.8.5"},"scripts":{"example":"parcel ./example/index.html --out-dir exampleDist","build":"microbundle --external all --jsx React.createElement","build:dev":"microbundle watch --external all --jsx React.createElement","dev":"concurrently \"npm run build:dev\" \"npm run example\"","docs:publish":"cd website && npm run build && npm run publish-gh-pages","docs:dev":"cd website && npm start","test":"jest"},"readme":"## What?!\n\nReusable is a library for reusing state and business logic between components.\n\n## Should I use this now?\n\nThis is a very early stage alpha\nIf you want to start experimenting with it and share feedback - yes\nIf you need it for a production app - no\n\n## Why?\n\nReusable solves the problems that state management is meant for, with a simple and clean API, inspired and based on React hooks API.\n\nReact hooks introduced new ways of thinking about state and side-effects.\nThese new ways made old habits obsolete, and require a new type of state management tool that embraces the same concepts:\n\n- Separation of concerns\n- Reusability\n- Composability\n- Simplicity\n\nWhile still providing the developers with structure and architecture with large-scale apps in mind.\n\n## Features\n\n- managing shareable state\n- handling side effects\n- memoization\n- reactive (subscription)\n\n## Design guidelines\n- immutability\n- reusability (duh)\n- performance\n- predictability\n- encapsulation (for shared libraries / lazy loading)\n- gradually adoptable\n\n# Documentation\n(https://reusablejs.github.io/reusable)[https://reusablejs.github.io/reusable]\n\n# Commonly asked questions\n\n## What about Context API?\n\nUsing Context API directly, introduces a few challenges. Deciding where in the component tree to put a certain Context is tricky, and also might change while building your app. It forces you to couple the data tree with the component tree.\nReusable tries to solve these issues by decoupling the reusable state from the component tree, and by providing other benefits, such as:\n- Time Travelling\n- Single Store\n- Compound Selectors\n- Structure\n\n## Is Reusable designed for large apps?\n\nReusable is built with large-scale apps in mind.\nThis is what affected most of the considerations when designing the solution:\n\n- The benefits of a single store and immutable data\n- The ability to do code reuse using custom hooks to prevent code duplication\n- Supporting DevTools for better debugging & QA\n- Support lazy-loaded modules\n\n# Feedback:\n\nhttps://goo.gl/forms/Jza0XsM7F3shvWhD2\n\n# What's missing:\n\n- Tests\n- DevTools\n- Docs\n- More Examples\n  - lazy-loaded modules example\n  - API requests\n  - Keyed states\n  - 3rd party\n- Time Travelling\n- TypeScript Support\n- Better error messages","readmeFilename":"README.md","gitHead":"69b3ba652acdbb0210ac3a7fb8dc094479b1b389","_id":"reusable@1.0.0-alpha.5","_nodeVersion":"11.13.0","_npmVersion":"6.7.0","dist":{"integrity":"sha512-F3cJAxqrSpRA7KwlXbl81w/m9Bs5jTRWnLaZZZWI2hvHiIoSf1sr8umzHdn217ehahmn9O74Iep2JTV92gADtg==","shasum":"2148cf552266215f151912f6f1cf50c21ee8d711","tarball":"https://registry.npmjs.org/reusable/-/reusable-1.0.0-alpha.5.tgz","fileCount":16,"unpackedSize":143568,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcrkgKCRA9TVsSAnZWagAAjboP/jpk+dk/zURsA3sLIN/a\nAFEaRkpCQEReqQpJs8njjPlzZHuKLcMVfpdMTKvFbB/ktF6EqikXtxAXzK1H\nRK+IeWiAK/uG/EC6RxHnf/YorT0tmeTgjvVUbuEMRViWFRzOM3cbdUCr6RD/\nfuHMhwmzwiNCF6uTwus0O9u62xJHH8YLkz5gX5GFvS3HUTj4WGuCfN4uGLfU\nZrIJGVXF7nptK8OpEfAFxw9qi5IVdMUrfyW7j4Cy/G9SMM/kcy22o4X/dkVf\nEmq1+DKeX4CHR60Th/XIQN/NJImr3ed7tV1BOglelJd9c380TQT/ypD/VBMU\nW/2/POLOL4XgTZZ7+IPWvBRriXOcd3viDN6zf7NElGa7DfUOhkBker4+M6eN\n39qM1cJVgxljvo6iuMu56+NMh921X1lt/N8KRWuPDSvgFjQqEl0QxGAzefWr\nXx6GR9MQ/OYTTMhpPp3IoyoBDKkCOUW2dG7IVDAFWkACCu95m6Tkh4bj7oE7\nDstwbayTckSO/NIg8DzQoE+cSxFLfGiS4q9F9XktkiHJjypR7javWNW2ZlR7\noNCgnTR5TYiy211XXbB32SjtJtCG/Es2dnD/8ubn5y33S6gee3JvJT7HFze7\niPKpOrpb1gx+KSxAqgfeVucBvvrZN7XpWGn4R2svn2G3e4zWtv1H1nRBAO9V\nO04U\r\n=gNjw\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIG3vmRJM29BfNYLTlyVmic2z0NXVWnw3CeDG4Cn6yRl9AiAGvYM+qgbtjKht4faAWxYnhimY9GABguTvTTDwcQxnAA=="}]},"maintainers":[{"email":"maayan@glikm.com","name":"morsdyce"}],"_npmUser":{"name":"morsdyce","email":"maayan@glikm.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/reusable_1.0.0-alpha.5_1554925578240_0.9479011136168523"},"_hasShrinkwrap":false},"1.0.0-alpha.6":{"name":"reusable","version":"1.0.0-alpha.6","description":"Reusable is a library for reusing state and business logic between components.","keywords":[],"main":"dist/reusable.js","source":"src/index.js","unpkg":"dist/reusable.umd.js","dependencies":{"@babel/helper-module-imports":"^7.0.0","babel-plugin-reusable":"^1.0.0-alpha.5"},"peerDependencies":{"react":">= 16.8","react-dom":">= 16.8"},"devDependencies":{"@babel/core":"^7.4.0","@babel/preset-env":"^7.4.2","@babel/preset-react":"^7.0.0","babel-plugin-macros":"^2.5.1","babel-plugin-tester":"^6.0.1","concurrently":"^4.1.0","jest":"^24.5.0","lodash":"^4.17.11","microbundle":"^0.11.0","parcel":"^1.12.3","prettier":"^1.16.4","react":"^16.8.5","react-dom":"^16.8.5"},"scripts":{"example":"parcel ./example/index.html --out-dir exampleDist","build":"microbundle --external all --jsx React.createElement","build:dev":"microbundle watch --external all --jsx React.createElement","dev":"concurrently \"npm run build:dev\" \"npm run example\"","docs:publish":"cd website && npm run build && npm run publish-gh-pages","docs:dev":"cd website && npm start","test":"jest"},"gitHead":"2cdb46816ff7122a715a2af0ad29b0de99b92d6e","_id":"reusable@1.0.0-alpha.6","_nodeVersion":"11.11.0","_npmVersion":"6.7.0","dist":{"integrity":"sha512-lA88f9rVujZBPKeqfwmKTIydiLRM5NYtt8tMV/Oajrbg8GAXjiqc0fS4owJCF2M87P2xlE9yhM/WpY0S9x3xVw==","shasum":"2309050a2b8322c43ccbd341c272153c05786017","tarball":"https://registry.npmjs.org/reusable/-/reusable-1.0.0-alpha.6.tgz","fileCount":10,"unpackedSize":75089,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJctZTJCRA9TVsSAnZWagAAc/4QAILIsVLITtBooLEl/HdA\nNGUIyh80KFrHtf+I0+D8+12BeWRcLPNl7O2MPGkecmwyfpktfELK5ElFOzti\nCML7pqK9s/5gtBUdm2TVQ/JKvHD6kxDXI4FMBRSRpByzieXMgW0Aakhrgu8W\nuXxOxuB7kikDcqABVuSEI2X6J9VpbkGuoSGrOyIz/X+SwXuNwfd6+jvBIpsQ\n4pXxf48i0r3dj2rCfyFsQdGus6mbnhjkRyRh+kghmmfLIGYVjBYMplqsz3t0\n3KiLDSiI3xLeEyZDBNzsKNkZlsMC4Jdhx44C+dhEDv60o5S9BfpQSnfAqUU9\n2XuSMGLfE8jC8BPx3oO/2Sty0zvOMczAKY9ifZCJCtHKjl2HaGq4KKKh/uPq\ntAmzaV7FbAv8KDk7XhzUxeuBuyF3+T/YRFy/yaELE8dL2haqJyBUZYVimGv0\nB+E/MOvzeGsjvFJLoufzzJvQw8m6EyYMi+QtMH0NKTG3qSRpIPF9L5NbxeOM\nrmSkMS2OcRZ3xAG1jnwDUvPbKwW0FCw03V4Ep9t2RqMdlZPHV6U0L+utoIrP\nv8vTmmx0KikWrpnzZnjh4lNShgBIYynZ++X8+lOywbOrLNwsqAUaCfIZB+57\nuC65reajq0cGv8Kqx1D90OZrDxtWHnSD1N34B3BBe9WMqBSQS0V/H5AAFkVy\nRJ+g\r\n=ihmM\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCID3cH3vgMYNUjvSdkCGWD6N9bldq+ZhTaPni39MQryfdAiEA/4Z6omDYUTTJiH3FM3oRSKG/0XtQKeLPAdE1sec4nak="}]},"maintainers":[{"email":"maayan@glikm.com","name":"morsdyce"}],"_npmUser":{"name":"adamklein","email":"adamklein.mail@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/reusable_1.0.0-alpha.6_1555403976718_0.03297780010889961"},"_hasShrinkwrap":false},"1.0.0-alpha.7":{"name":"reusable","version":"1.0.0-alpha.7","description":"Reusable is a library for reusing state and business logic.","keywords":[],"main":"dist/reusable.js","source":"src/index.js","unpkg":"dist/reusable.umd.js","dependencies":{"@babel/helper-module-imports":"^7.0.0","babel-plugin-reusable":"^1.0.0-alpha.5"},"peerDependencies":{"react":">= 16.8","react-dom":">= 16.8"},"devDependencies":{"@babel/core":"^7.4.0","@babel/preset-env":"^7.4.2","@babel/preset-react":"^7.0.0","babel-plugin-macros":"^2.5.1","babel-plugin-tester":"^6.0.1","concurrently":"^4.1.0","jest":"^24.5.0","lodash":"^4.17.11","microbundle":"^0.11.0","parcel":"^1.12.3","prettier":"^1.16.4","react":"^16.8.5","react-dom":"^16.8.5"},"scripts":{"example":"parcel ./example/index.html --out-dir exampleDist","build":"microbundle --external all --jsx React.createElement","build:dev":"microbundle watch --external all --jsx React.createElement","dev":"concurrently \"npm run build:dev\" \"npm run example\"","docs:publish":"cd website && npm run build && npm run publish-gh-pages","docs:dev":"cd website && npm start","test":"jest"},"gitHead":"a24aba392bd41d8a0d2d0aff11fe279fbd3c3b5f","_id":"reusable@1.0.0-alpha.7","_nodeVersion":"11.11.0","_npmVersion":"6.7.0","dist":{"integrity":"sha512-XKttAuj9bQON/9stu3u8cmJK0j+lSN/yCxAJLYQGMwV0OAxRskKlJxZAqQaOa4dYE7qtBQJC31QDmPEexvolzw==","shasum":"2c7b82f4207b47c29d9f68aefac5715deacf57be","tarball":"https://registry.npmjs.org/reusable/-/reusable-1.0.0-alpha.7.tgz","fileCount":10,"unpackedSize":82744,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcuJrOCRA9TVsSAnZWagAAhJoP/iv7JYEz1dH9vZ8D2bNj\nZV4wwS9xyo8hfbIGEdYAnckC4ncPnvdHNAti+09u0BOoZP35jNpAU2Amb++P\nsiKpU6lICZ3ee11agPjX4onhqgVuWHXrAVUqBEHMrszoriC2CBhqXSFcv16s\nmtZ5fppoBZQo+NdE6jpkCoWLKKppc/dzt8RvKFmGOq1TkGGuShy/7Ad19ahH\n6vrJVL+vdncTgbwB9EytHIW13DIsE1V7NJiynHmMMBQ+jQsyMUx4LOnCtRjn\nN82oZc6yCRJikExQri1V4TvgJc7qgyvrRqdlsqlCb+d/q7SocSXxbhP1Cj12\nxM/b4wnKNr/xS09BZEJQ/A1Kp8oQ0/krAioyyOgnhmTwOhOefuaDtqShV6+h\nzs/7+VszrDJzhbGJHG8jiOFqkqTZh6tAFjUPhRldnHcgLNrbwdPe2Iwy0sKk\n548R1eyUWLznKhHsyl0AYBHhC5UrIaH79Vl6p7aa4TnKBkwGO/61sOYzZSBS\nhOk8jITUGZG4zCYOuumDV+0THooHGeeUhMMNPeqPrknOrHRdh8jQ9hG7/QR0\nmcyfZBU/bMm+k77P/Tu/V0CLMlEANFZmK1lwA1YuWUCYRR1C6jSFE2cqVJR8\nViL3IppaHYhMcMsReDNKYZuBFoTWiSERJu0EGaMqD79ENeHaapJ9QLkQ+YCR\nTy6l\r\n=u3yG\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIFGHlkBKoz8J9rxsndI5dXCyo5sI3WPWkukPXDYXODahAiEA+YNXEDVaVECXVEvfi4fXTa+l55LgWFgL6o8nLBWxeek="}]},"maintainers":[{"email":"maayan@glikm.com","name":"morsdyce"}],"_npmUser":{"name":"adamklein","email":"adamklein.mail@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/reusable_1.0.0-alpha.7_1555602126101_0.6712128728459503"},"_hasShrinkwrap":false},"1.0.0-alpha.8":{"name":"reusable","version":"1.0.0-alpha.8","description":"Reusable is a library for reusing state and business logic between components.","keywords":[],"main":"dist/reusable.js","source":"src/index.js","unpkg":"dist/reusable.umd.js","dependencies":{"@babel/helper-module-imports":"^7.0.0","babel-plugin-reusable":"^1.0.0-alpha.5"},"peerDependencies":{"react":">= 16.8","react-dom":">= 16.8"},"devDependencies":{"@babel/core":"^7.4.0","@babel/preset-env":"^7.4.2","@babel/preset-react":"^7.0.0","babel-plugin-macros":"^2.5.1","babel-plugin-tester":"^6.0.1","concurrently":"^4.1.0","jest":"^24.5.0","lodash":"^4.17.11","microbundle":"^0.11.0","parcel":"^1.12.3","prettier":"^1.16.4","react":"^16.8.5","react-dom":"^16.8.5"},"scripts":{"example":"parcel ./example/index.html --out-dir exampleDist","build":"microbundle --external all --jsx React.createElement","build:dev":"microbundle watch --external all --jsx React.createElement","sandbox":"cd sandbox && npm start","dev":"concurrently 'npm run build:dev' 'npm run sandbox'","docs:publish":"cd website && npm run build && npm run publish-gh-pages","docs:dev":"cd website && npm start","test":"jest"},"gitHead":"8292468ee6bca4cbea1d06e6d3dac0b8452f3f9f","_id":"reusable@1.0.0-alpha.8","_nodeVersion":"11.15.0","_npmVersion":"6.7.0","dist":{"integrity":"sha512-9P4CAlULwDsDpXVEyFx7pF5ztzUrX2+ecsxiWKRU8d7vfbmFTWJIZmYSVKulJTnt7dpsX/BXHgYIJZTCuhpsBA==","shasum":"4f13dfdc08d14825703e908ec376c71cb317d195","tarball":"https://registry.npmjs.org/reusable/-/reusable-1.0.0-alpha.8.tgz","fileCount":16,"unpackedSize":92301,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc6ndqCRA9TVsSAnZWagAAf6sP/0UAZO5oqx8S42hsXrHI\n4NERFmbZGqcP1J7aBLdLbljptJTCtt0rAZ1FrBsbrUEd17ywSQG0C4u2rjpw\nxgREc+bA9q8ULv/j8Os8j/T7Yu6Zwyz5Oc/KVOjbbpZTDol858i0zWZ+bE8U\ne2aFPMRCsFN7tcq57WUXhTuXi1LJ+Vd00Lws1rKkw5XFK4YZrVPIHK/r7wFF\n0Cm3FtaOQl/557cAovh8RSbIw5+vBfk320vK2Of/AeJbCHpqxNtpR6d7OLyC\nfSoqDr/nyGGZ8JfvQP8cQQsieUsZLa6BE5CQwJnd1pgKMcLiCrwSdO9VYQlI\nFrR1ANlX2TlGgTKXYz637WDfjmcILpSvJmBmaaR1NXbJrkjZH0nxt1CK0y6k\n+t0E7+aiOPsyy+0wrv3wN8Nbz1CZZENXHk6W+bnVTmPeZnNbJLdd+0eXS8fe\nwAMoiEGxm3SjMUcpGiEDZxRmh51V/DtXrW2rRrJHVZ8SzUTjH1H4eUQn46oh\nEtxxTkDKRm5f82uS9d8D/gaG5TlEyNQbr7F/fkV64NGT2LtQ7yni6hdYC66d\nEdHw6EUvaHSPfw8WHQTS2+C4eb+hasV+2kVsiezkAtoglAVGKRaiwHYiZkJz\nKCiJ2yVWqh/wzDZPxamT/faMgAmcee9TE3szIV29OSZyWc1R8s0q8JF9YB6E\nZ8pg\r\n=0qpe\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD8KY2xJB1VCEIt4AO9I+V5qWORgWud6+k0dx1OfM/CoAIhAKFvQX/s+fIJzSSRFfSASoXq3gfEKTyNVkU8np1ppxao"}]},"maintainers":[{"email":"maayan@glikm.com","name":"morsdyce"}],"_npmUser":{"name":"morsdyce","email":"maayan@glikm.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/reusable_1.0.0-alpha.8_1558869865210_0.06773519779011017"},"_hasShrinkwrap":false},"1.0.0-alpha.9":{"name":"reusable","version":"1.0.0-alpha.9","description":"Reusable is a library for reusing state and business logic between components.","keywords":[],"main":"dist/reusable.js","source":"src/index.js","unpkg":"dist/reusable.umd.js","dependencies":{"@babel/helper-module-imports":"^7.0.0","babel-plugin-reusable":"^1.0.0-alpha.5"},"peerDependencies":{"react":">= 16.8","react-dom":">= 16.8"},"devDependencies":{"@babel/core":"^7.4.0","@babel/preset-env":"^7.4.2","@babel/preset-react":"^7.0.0","babel-plugin-macros":"^2.5.1","babel-plugin-tester":"^6.0.1","concurrently":"^4.1.0","jest":"^24.5.0","lodash":"^4.17.11","microbundle":"^0.11.0","parcel":"^1.12.3","prettier":"^1.16.4","react":"^16.8.5","react-dom":"^16.8.5"},"scripts":{"example":"parcel ./example/index.html --out-dir exampleDist","build":"microbundle --external all --jsx React.createElement","build:dev":"microbundle watch --external all --jsx React.createElement","sandbox":"cd sandbox && npm start","dev":"concurrently 'npm run build:dev' 'npm run sandbox'","docs:publish":"cd website && npm run build && USE_SSH=true npm run publish-gh-pages","docs:dev":"cd website && npm start","test":"jest"},"gitHead":"c2dd603120e991832d876004c2794fc07b828a58","_id":"reusable@1.0.0-alpha.9","_nodeVersion":"11.11.0","_npmVersion":"6.7.0","dist":{"integrity":"sha512-bPmnQMIS3ubhHeGYAGcGq/2dcqxTRtuvsz9ENUkt5gEhor+xq+GWSf0TZPHyP/RPvrZxhh6f6E2aVJ1zGbp9qA==","shasum":"b5a5e8b96ec6b8783c71e28c1b940fd86d436449","tarball":"https://registry.npmjs.org/reusable/-/reusable-1.0.0-alpha.9.tgz","fileCount":10,"unpackedSize":35340,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc7THkCRA9TVsSAnZWagAAgmMQAIpK3Cahg50q1s3DI03w\nO5ckpUXjlRhlhk5wd6LQsUslQybbgNsIjAeHnk0qCbzx9P92iUxp2DTdPDOU\n0Q+Go/jhmTqNUz5l0KiraysHc0FXqpSi8R5QxfvySWHSKkT3dGFJYxQpO8BT\nqOBDys7xb8NcN7WDPN85ftCHtCKlu0H9cQZTvU1PpwB4qRZ0tyEymphGFEFb\nrZBmRptl+Y3ibrGkRRYCYG6ue9QaVFKVDX3lbs5c48EeAHbhOkQHx96bMBY/\nKHw/0OFRFY/6+5mRgzcGHhjrC4eeCMlzL4H7X5eXJSaeWIIeLndUa27hKE9c\nHYTTqjgDeXfpQp8ZdohGdequ2owg74Sc6Fe7MGkjhJeYCxox9Tn8/GkZujMn\nI/eXptI7G4iTBtA0EpDxFDzqbTA0J2+x9XGPUcLsZrT0oyk3P3/KHgVz0S1F\n/V2NC2EAptpaxrE2KcVv6MJHdxZb10Ro0RUYddnfUqIGyxhNs7GpM1lHc2lm\nUpT5CfmBWeYdmMPCTwug3cminq2M7ZWzmWHt96zQknspnAAHqHOHnnx3KsLT\nJEhSESOU1w+8uVYZkgJYLzCpF0GcNUtiP6z/FMC47VkU615GDPyHrw/zVg2I\neabTyhSqko6mUrg8u+zTdjPMa4M5SIEw93cA8vbICco2aYMtmBuSWeqNITR/\nfjSS\r\n=HWni\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIB2iavbHwHYs0GYLKwzzLPkxAygz2Zs9yakVCHOLEi6zAiBTKgkiEweepf/PvLw5NK1yFq+6ycNGgAmGDpQTqQ9acA=="}]},"maintainers":[{"email":"maayan@glikm.com","name":"morsdyce"}],"_npmUser":{"name":"adamklein","email":"adamklein.mail@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/reusable_1.0.0-alpha.9_1559048675634_0.152703856803998"},"_hasShrinkwrap":false},"1.0.0-alpha.10":{"name":"reusable","version":"1.0.0-alpha.10","description":"Go here:   [https://reusablejs.github.io/reusable](https://reusablejs.github.io/reusable)","keywords":[],"main":"dist/reusable.js","source":"src/index.js","unpkg":"dist/reusable.umd.js","dependencies":{"@babel/helper-module-imports":"^7.0.0","babel-plugin-reusable":"^1.0.0-alpha.5"},"peerDependencies":{"react":">= 16.8","react-dom":">= 16.8"},"devDependencies":{"@babel/core":"^7.4.0","@babel/plugin-proposal-class-properties":"^7.4.4","@babel/preset-env":"^7.4.2","@babel/preset-react":"^7.0.0","babel-plugin-macros":"^2.5.1","babel-plugin-tester":"^6.0.1","concurrently":"^4.1.0","jest":"^24.5.0","lodash":"^4.17.11","microbundle":"^0.11.0","parcel":"^1.12.3","prettier":"^1.16.4","react":"^16.8.5","react-dom":"^16.8.5","react-hooks-testing-library":"^0.5.0","react-test-renderer":"^16.8.6"},"scripts":{"example":"parcel ./example/index.html --out-dir exampleDist","build":"microbundle --external all --jsx React.createElement","build:dev":"microbundle watch --external all --jsx React.createElement","sandbox":"cd sandbox && npm start","dev":"concurrently 'npm run build:dev' 'npm run sandbox'","docs:publish":"cd website && npm run build && USE_SSH=true npm run publish-gh-pages","docs:dev":"cd website && npm start","test":"jest"},"gitHead":"0561d4250553210b1cc4338599a651787e5a3b10","_id":"reusable@1.0.0-alpha.10","_nodeVersion":"11.11.0","_npmVersion":"6.7.0","dist":{"integrity":"sha512-2e2xDfIRpdZHH6yC/2PPOQbTkKFUGSJhPIjKzGTD41BWJ1baqltFa+X70SVvnXi5jfp7wSLALf+Pn0jZ/VvBLA==","shasum":"1b40cf0abf73789b992abcfab318553a30adbb2f","tarball":"https://registry.npmjs.org/reusable/-/reusable-1.0.0-alpha.10.tgz","fileCount":20,"unpackedSize":70842,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc/C+oCRA9TVsSAnZWagAAmrsQAJogJly4iaI/oBU320ph\n93ZiajIBRy3MbDaQJHMuyxwuN4ioStMUhmkleYe7r3n2kYohy/Z6KCb+VQrI\nINHZNQ0Qz/spvJyIL6R3Y0xE/nM7Di9XGe9RIAzI0FujkVmExJ9laesIp1nX\nuE0kjRnIQ5RHgR85WJs5F60H2g7hmA0eNy/FPDH8zqxrIiY4Tp6AZlU1XDAK\njhUao1P+TQq4gawL8Ojzf2AiVO7oa6KpNU9ws5hxMblAmK35lyN1JK5zOd4q\n8v00uVnG/CknhrxQzqdVhFY9FiICvwn91ZUBv6dI7blJAA6LfyXa89sApIFo\n422CEP1bNSqVnbxfjyFdkqfxojXbdpc8zQDyo5Mm9Q2hmqD1sXubBQtjKOPm\nxrOJeG2tFojfIsIUAhRauH3DCjOwm0A9htqmGH8iCy1eDtghiGJktUU89azi\ntUc9ano19l5DFH5vITaCTfhxwFp4vQxiR7ZIzQyKqdx9Jm+8GZuIARc5x7OH\nxlJYm7MRctO/H8akOUu3NYtnT9M1TOI7mI+LpeZ+JhwD7LBcVb5Qr8987ipO\n8+al5FU8sm1ZH1XkjYgl9e0tSAHLa1+8wjR7YXzLPICNNvYLMpGK7w5OMDq3\nkd146tIUiNb2Ivu2m1AEeoQ5Hwfy+bGUvu/bm1aM1FAWFXzto9h70GbXzwE6\nzhVR\r\n=QXs+\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCx1xtxsCT0ByHDfSq13uK5wLqgOFW3wYz9/snyWpPltgIhAPx4MC5EyPSPebt5Zfdwb841Gp//9HkZeqC0hafXsXHL"}]},"maintainers":[{"email":"maayan@glikm.com","name":"morsdyce"}],"_npmUser":{"name":"adamklein","email":"adamklein.mail@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/reusable_1.0.0-alpha.10_1560031143719_0.931629915165906"},"_hasShrinkwrap":false},"1.0.0-alpha.11":{"name":"reusable","version":"1.0.0-alpha.11","description":"[![Build Status](https://circleci.com/gh/reusablejs/reusable.svg?style=svg)](https://circleci.com/gh/reusablejs/reusable) [![npm version](https://badge.fury.io/js/reusable.svg)](https://badge.fury.io/js/reusable)","keywords":[],"main":"dist/index.js","source":"src/index.ts","unpkg":"dist/reusable.umd.js","types":"dist/index.d.ts","dependencies":{"@babel/helper-module-imports":"^7.0.0","@types/react":"^16.8.19","babel-plugin-reusable":"^1.0.0-alpha.5"},"peerDependencies":{"react":">= 16.8","react-dom":">= 16.8"},"devDependencies":{"@babel/core":"^7.4.0","@babel/plugin-proposal-class-properties":"^7.4.4","@babel/preset-env":"^7.4.2","@babel/preset-react":"^7.0.0","@types/jest":"^24.0.13","@types/node":"^12.0.3","babel-plugin-macros":"^2.5.1","babel-plugin-tester":"^6.0.1","concurrently":"^4.1.0","jest":"^24.8.0","lodash":"^4.17.11","microbundle":"^0.11.0","parcel":"^1.12.3","prettier":"^1.16.4","react":"^16.8.5","react-dom":"^16.8.5","react-hooks-testing-library":"^0.5.0","react-test-renderer":"^16.8.6","ts-jest":"^24.0.2"},"scripts":{"example":"parcel ./example/index.html --out-dir exampleDist","build":"microbundle --external all --jsx react","build:dev":"microbundle watch --external all --jsx react","sandbox":"cd sandbox && npm start","dev":"concurrently 'npm run build:dev' 'npm run sandbox'","docs:publish":"cd website && npm run build && USE_SSH=true npm run publish-gh-pages","docs:dev":"cd website && npm start","test":"jest"},"gitHead":"cc86bee1e866ea89597de9a4fe561f8f63e6fd7f","_id":"reusable@1.0.0-alpha.11","_nodeVersion":"11.11.0","_npmVersion":"6.7.0","dist":{"integrity":"sha512-EpHbGBFTAxs3+wN2BeV2hJ3IhbTHSr9ojejiPJCSjEEXKOK1MxxaTd2IweDw9UIrO8z7l4TLvAlJV8L5lLlLSw==","shasum":"c9a7ea7cb1af068f8c655460b289c69878c2fd33","tarball":"https://registry.npmjs.org/reusable/-/reusable-1.0.0-alpha.11.tgz","fileCount":20,"unpackedSize":71728,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc/VzECRA9TVsSAnZWagAANRoP/1EbxaDsNivauPxCWqHy\npDSBly3gcUEjmIfpUhRrCCWAQUN2fYp1LzcIycgM0ZmP02jpEpSGOgrRdJFx\nIACmesbgLp99WIAmEzU2vGZieyFcFLFbZ1hH+VfxciQaBHhYYf7CCXb0I2fw\nRa+xm4I6KxcRC69lnNpWWIkydN6SlHlk48uenrhrdJ8q2KeG6yE/dvrmxvLP\nfXjh3Ic1EDRBxEjJKGL7PEl1nDXir8eDGnH2KET8VVFxrHeIarRNh5oO8Ugy\ni4TVJ9MLgVyLQlw5QPN+g5/c29qrd/U+emAOEDA6PktUCjrsvmqf1lpNYoGS\nmD2JFU1VusbbnuvSJUjQjP9eX2IcTSuPaaq6Xhm2hak+1HMaEKQpNxS8PgTG\nc2tfRVcTmmwOnuA7Wr/6C9VYtBYsoDVTc17cUIxmLiHypvD0rXlfZRyodbnv\nnDFxI4Tn5u4TDXvlTjE7U6OKCvaXqtGAf3mmLPCLY1zWvQuM1TVHCyMeMXIJ\nlbqmozJfT+RdNBzbWSn9MwDwKSVPUWJ6m965goRRJxDs4ybnRSHjUwC+8nss\nttGhME42ARicS+sRJYIYEDQ/KR1DKSGTlxIKGkfnAmciSvXjwa2lz02ipVvZ\naxgiVWMTJBLhNR/6/9yr9cuSCeiS8Wy+yo5qzl5leu5v6bhQ+9CaQLNAiSut\nRMEh\r\n=gAG0\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIH47CsVdjOYl3/aiZNe19+IgjqDE4U8+4ofCUOV0JIWwAiEAvu+pRG9qeeBre37ov4HsSs/vwbrmjJ2kHTjGbTi6XZM="}]},"maintainers":[{"email":"maayan@glikm.com","name":"morsdyce"}],"_npmUser":{"name":"adamklein","email":"adamklein.mail@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/reusable_1.0.0-alpha.11_1560108227609_0.14024898205863634"},"_hasShrinkwrap":false},"1.0.0-alpha.12":{"name":"reusable","version":"1.0.0-alpha.12","description":"[![Build Status](https://circleci.com/gh/reusablejs/reusable.svg?style=svg)](https://circleci.com/gh/reusablejs/reusable) [![npm version](https://badge.fury.io/js/reusable.svg)](https://badge.fury.io/js/reusable)","keywords":[],"main":"dist/index.js","source":"src/index.ts","unpkg":"dist/reusable.umd.js","types":"dist/index.d.ts","dependencies":{"@babel/helper-module-imports":"^7.0.0","@types/react":"^16.8.19","babel-plugin-reusable":"^1.0.0-alpha.5"},"peerDependencies":{"react":">= 16.8","react-dom":">= 16.8"},"devDependencies":{"@babel/core":"^7.4.0","@babel/plugin-proposal-class-properties":"^7.4.4","@babel/preset-env":"^7.4.2","@babel/preset-react":"^7.0.0","@types/jest":"^24.0.13","@types/node":"^12.0.3","babel-plugin-macros":"^2.5.1","babel-plugin-tester":"^6.0.1","concurrently":"^4.1.0","jest":"^24.8.0","lodash":"^4.17.11","microbundle":"^0.11.0","parcel":"^1.12.3","prettier":"^1.16.4","react":"^16.8.5","react-dom":"^16.8.5","react-hooks-testing-library":"^0.5.0","react-test-renderer":"^16.8.6","ts-jest":"^24.0.2"},"scripts":{"example":"parcel ./example/index.html --out-dir exampleDist","build":"microbundle --external all --jsx react","build:dev":"microbundle watch --external all --jsx react","sandbox":"cd sandbox && npm start","dev":"concurrently 'npm run build:dev' 'npm run sandbox'","docs:publish":"cd website && npm run build && USE_SSH=true npm run publish-gh-pages","docs:dev":"cd website && npm start","test":"jest"},"gitHead":"227693a52279b32d0da57a2bb8fbe2b4a6117e86","_id":"reusable@1.0.0-alpha.12","_nodeVersion":"11.11.0","_npmVersion":"6.7.0","dist":{"integrity":"sha512-r0pOVSKNOZ3Ana3royy6SAPa5iroQZMRyouiaRFCfDUBQSfzT+0YQAlSRmiHgSbXf9+sIy3V5cPYD7zRM3YQZA==","shasum":"ed94af4ccbbf466cee801a06e29a81833c51f79c","tarball":"https://registry.npmjs.org/reusable/-/reusable-1.0.0-alpha.12.tgz","fileCount":20,"unpackedSize":72781,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc/WrvCRA9TVsSAnZWagAArBcQAI9eSuQfko3lzNqoQzzB\nIKq7RaLjhZ/l6gpK4Kl6EVPPHvWd+3kpcJZop18fFfLE4rs+GxAWILp5Xr7O\nwdghwlAJJBPlv6G6dmYrstzMCbkmP/xz/k/xBXQqekkm7Ik1QyHEVlyDk+YW\n8Qj1TqUWLyy45VStmR660/p+XmowmsWEIW3LfsAlxWP8Mm9KGb6/6nxZ2nvN\n+jpEVgXw3kErP5x+XgeeSQOpHX06n1g2saQ2ktEGcGmbb34cdkrysws1nhia\ncaDcDNn940BJI5lKg5htm2S3y5buvVH7j+Tu0BX32CyEAO2BfPJI7zf7vNRR\nYDrz//Atqj3IjhNFjy8ql4jB3sCRh3jpDXAXi/nDBD4QgxQRqerlllx3BZTW\nH+5YoIyH/sm6DLAk2iuzm+y7UeDINvGnUMUUNR/HtR9uLWSwM2vm5Eql3eXI\nzrNKYIhZqTDqBE7JGogdlkieHxS3ILMJFl00epDEoRNwQu0F9qYG20BpDrai\nsHX+mhzCg2eoXUGYyNfokZnK7717ug8p039vpfFpeopp3d8idfloecr5Me7g\nU1IbpZgZe4hxkYEqjcV0FM46Z3pIPcQbwKuSkxwVc46Zg/1htftd6sk7/FZh\nUzvFYqiXPTrsG3z88YZW89iuROW+eTCR1Ajt0xkO2oIcV6vgOm6SZUanWAig\n23lV\r\n=9MmK\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDzBDAQazjJ/fQK6dcrdbZaAhpDq8jfrPLaHUzDmG9F/wIhAOLlejhU9+ePitGB2wZngqaMEwF5iU2cu19TyYeVFO6Y"}]},"maintainers":[{"email":"maayan@glikm.com","name":"morsdyce"}],"_npmUser":{"name":"adamklein","email":"adamklein.mail@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/reusable_1.0.0-alpha.12_1560111854808_0.6010375121314173"},"_hasShrinkwrap":false},"1.0.0-alpha.13":{"name":"reusable","version":"1.0.0-alpha.13","description":"[![Build Status](https://circleci.com/gh/reusablejs/reusable.svg?style=svg)](https://circleci.com/gh/reusablejs/reusable) [![npm version](https://badge.fury.io/js/reusable.svg)](https://badge.fury.io/js/reusable)","keywords":[],"main":"dist/index.js","source":"src/index.ts","unpkg":"dist/reusable.umd.js","types":"dist/index.d.ts","dependencies":{"@babel/helper-module-imports":"^7.0.0","babel-plugin-reusable":"1.0.0-alpha.7"},"peerDependencies":{"react":">= 16.8","react-dom":">= 16.8"},"devDependencies":{"@babel/core":"^7.4.0","@babel/plugin-proposal-class-properties":"^7.4.4","@babel/preset-env":"^7.4.2","@babel/preset-react":"^7.0.0","@types/jest":"^24.0.13","@types/node":"^12.0.3","@types/react":"^16.8.19","babel-plugin-macros":"^2.5.1","babel-plugin-tester":"^6.0.1","concurrently":"^4.1.0","jest":"^24.8.0","lodash":"^4.17.11","microbundle":"^0.11.0","parcel":"^1.12.3","prettier":"^1.16.4","react":"^16.8.5","react-dom":"^16.8.5","react-hooks-testing-library":"^0.5.0","react-test-renderer":"^16.8.6","ts-jest":"^24.0.2"},"scripts":{"example":"parcel ./example/index.html --out-dir exampleDist","build":"microbundle --external all --jsx react","build:dev":"microbundle watch --external all --jsx react","sandbox":"cd sandbox && npm start","dev":"concurrently 'npm run build:dev' 'npm run sandbox'","docs:publish":"cd website && npm run build && USE_SSH=true npm run publish-gh-pages","docs:dev":"cd website && npm start","test":"jest"},"readme":"[![Build Status](https://circleci.com/gh/reusablejs/reusable.svg?style=svg)](https://circleci.com/gh/reusablejs/reusable)\n[![npm version](https://badge.fury.io/js/reusable.svg)](https://badge.fury.io/js/reusable)\n\n# What?!\nReusable is a solution for state management, based on React Hooks.\n\nIt allows you to transform your custom hooks to singleton stores, and subscribe to them directly from any component.\n\nThe benefits:  \n- Stores are decoupled from component tree\n- You can use selectors and bail out of render\n- Stores can co-depend without worrying about provider order\n- It's easy to create packages that rely on global state, and plug them into apps seamlessly\n\n# Show me the code!\nWrap your app with a provider:\n```javascript\nconst App = () => (\n  <ReusableProvider> {/* no initialization code, stores automatically plug into the top provider */}\n    ...\n  </ReusableProvider>\n)\n```\n\nAnd just pass your custom hooks to `createStore`:\n\n```javascript\nconst useCounter = createStore(() => {\n  const [counter, setCounter] = useState(0);\n  \n  return {\n    counter,\n    increment: () => setCounter(prev => prev + 1)\n  }\n});\n```\n\nThen you get a singleton store, and a hook that subscribes directly to that store:\n```javascript\nconst Comp1 = () => {\n  const something = useCounter();\n}\n\nconst Comp2 = () => {\n  const something = useCounter(); // same something\n}\n```\n\n## Selectors\nYou can also use selectors, and your component will re-render only if the return value changed:  \n\n```javascript\nconst Comp1 = () => {\n  const isPositive = useCounter(state => state.counter > 0);\n   // Will only re-render if switching between positive and negative\n}\n```\n\n## Using stores from other stores\nEvery store can use any other store, without worrying about provider order.\nJust use the store's hook inside the other store:\n```javascript\nconst useCurrentUser = createStore(() => ...);\nconst usePosts = createStore(() => ...);\n\nconst useCurrentUserPosts = createStore(() => {\n  const currentUser = useCurrentUser();\n  const posts = useCurrentUser();\n  \n  return ...\n});\n```\n\n# Docs\nCheck out the full docs here:\n[https://reusablejs.github.io/reusable](https://reusablejs.github.io/reusable)\n\n\n# What about hooks+Context?\nUsing plain context is not a best solution for state management, that led us to write this library:\n- When managing global state using Context in a large app, you will probably have many small, single-purpose providers. Soon enough you'll find a Provider wrapper hell.\n- When you order the providers vertically, you can’t dynamically choose to depend on each other without changing the order, which might break things.\n- Context doesn't support selectors, render bailout, or debouncing\n\n## Feedback / Contributing:\nWe would love your feedback / suggestions\nPlease open an issue for discussion before submitting a PR\nThanks\n","readmeFilename":"README.md","gitHead":"f352949517cab6f25cb70d251d2e81678a507bcb","_id":"reusable@1.0.0-alpha.13","_nodeVersion":"11.11.0","_npmVersion":"6.7.0","dist":{"integrity":"sha512-X85Tcat9KY7t0aGg83H+UwSeF/vwpwJTkbK0rJcI7td60NqLf3nhY/z/R+jl4j+h281rs7M/xO7JCYkJyf0ypw==","shasum":"5da721b8b0b41b1633ed55632b235b38f6c8369c","tarball":"https://registry.npmjs.org/reusable/-/reusable-1.0.0-alpha.13.tgz","fileCount":20,"unpackedSize":75799,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdA3yFCRA9TVsSAnZWagAA2e4P/Ax4hkS7TEUwvoAQGtQo\nmsp51OunF8fkpUb9B8a7DkNSTiunG2reU8t1dt2ENHTeqeS3hR95vWX/lbr9\ndpWrNb0ZDVmOW3K5+O9D5PDLNuVgUPYEVMHQJA3VGgt3mRnVLD7qusV+lvXW\nBCqRMt+w3j/4Wv4rf6iOu7uzD8xG4oQFMo7eEwSjV0AtmgRTwxn/SBRALlOL\nHMpiAyP0l2eDEY22NqnRW9oOLACwN1bIduaKYGIJW+XDvp6FkPY5GGAaF7bc\ngmc1KvhETw3EE3fsykc4OrX05HNSJWl7sKhDrUpNw90IcSvtD3/mC1yqkb5c\nRf6J2Y8yriyeKI6t62Gsxj9fCrNTsScDdac/2gOwJ4iEtHeozG/359VnLotC\nffvNC2OIVZG0gPxZaihMyasvR8xidfuqGyt3WFkejT0ew3yS0EUcbgtiRLUV\nXtQweK/oKIk+jYyYs2qj2YpeD/6N/+uWs67FOm1gsKXBtWNPeY8Pl1fcTdK4\nAlV3uSTHOvYO7K44CttQ8yuuRGdDX534/x1+I3lskG9bm/oXxehT9v4vm96s\nh7MTBNL2Mhf6vFLB1f56iG12l3luqKmqXKpWAIa9u7rrd0fbgVQsQvf9WAvi\ntsHT7JYh+EJg7P6rCx8TzNQ5LcOGBRJ5fvKPDtQIK4XMwKvVrbGqnTfe22UG\ngYpE\r\n=m3BO\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCdgNp5pMB54MY3aKMVZWZYwaL66QjQ6lgs4v0oNN245QIgd3fSkftPB9eqJcGR7te/ekm6Yw1nMlOpJq3zFIa0ovU="}]},"maintainers":[{"email":"maayan@glikm.com","name":"morsdyce"}],"_npmUser":{"name":"adamklein","email":"adamklein.mail@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/reusable_1.0.0-alpha.13_1560509572896_0.36421510630930287"},"_hasShrinkwrap":false},"1.0.0-alpha.14":{"name":"reusable","version":"1.0.0-alpha.14","description":"[![Build Status](https://circleci.com/gh/reusablejs/reusable.svg?style=svg)](https://circleci.com/gh/reusablejs/reusable) [![npm version](https://badge.fury.io/js/reusable.svg)](https://badge.fury.io/js/reusable)","keywords":[],"main":"dist/index.js","source":"src/index.ts","unpkg":"dist/reusable.umd.js","types":"dist/index.d.ts","dependencies":{"@babel/helper-module-imports":"^7.0.0","babel-plugin-reusable":"1.0.0-alpha.7"},"peerDependencies":{"react":">= 16.8","react-dom":">= 16.8"},"devDependencies":{"@babel/core":"^7.4.0","@babel/plugin-proposal-class-properties":"^7.4.4","@babel/preset-env":"^7.4.2","@babel/preset-react":"^7.0.0","@types/jest":"^24.0.13","@types/node":"^12.0.3","@types/react":"^16.8.19","babel-plugin-macros":"^2.5.1","babel-plugin-tester":"^6.0.1","concurrently":"^4.1.0","jest":"^24.8.0","lodash":"^4.17.11","microbundle":"^0.11.0","parcel":"^1.12.3","prettier":"^1.16.4","react":"^16.8.5","react-dom":"^16.8.5","react-hooks-testing-library":"^0.5.0","react-test-renderer":"^16.8.6","ts-jest":"^24.0.2"},"scripts":{"example":"parcel ./example/index.html --out-dir exampleDist","build":"microbundle --external all --jsx react","build:dev":"microbundle watch --external all --jsx react","sandbox":"cd sandbox && npm start","dev":"concurrently 'npm run build:dev' 'npm run sandbox'","docs:publish":"cd website && npm run build && USE_SSH=true npm run publish-gh-pages","docs:dev":"cd website && npm start","test":"jest"},"readme":"[![Build Status](https://circleci.com/gh/reusablejs/reusable.svg?style=svg)](https://circleci.com/gh/reusablejs/reusable)\n[![npm version](https://badge.fury.io/js/reusable.svg)](https://badge.fury.io/js/reusable)\n\n# What?!\nReusable is a solution for state management, based on React Hooks.\n\nIt allows you to transform your custom hooks to singleton stores, and subscribe to them directly from any component.\n\nThe benefits:  \n- Stores are decoupled from component tree\n- You can use selectors and bail out of render\n- Stores can co-depend without worrying about provider order\n- It's easy to create packages that rely on global state, and plug them into apps seamlessly\n\n# Show me the code!\nWrap your app with a provider:\n```javascript\nconst App = () => (\n  <ReusableProvider> {/* no initialization code, stores automatically plug into the top provider */}\n    ...\n  </ReusableProvider>\n)\n```\n\nAnd just pass your custom hooks to `createStore`:\n\n```javascript\nconst useCounter = createStore(() => {\n  const [counter, setCounter] = useState(0);\n  \n  return {\n    counter,\n    increment: () => setCounter(prev => prev + 1)\n  }\n});\n```\n\nThen you get a singleton store, and a hook that subscribes directly to that store:\n```javascript\nconst Comp1 = () => {\n  const something = useCounter();\n}\n\nconst Comp2 = () => {\n  const something = useCounter(); // same something\n}\n```\n\n## Selectors\nYou can also use selectors, and your component will re-render only if the return value changed:  \n\n```javascript\nconst Comp1 = () => {\n  const isPositive = useCounter(state => state.counter > 0);\n   // Will only re-render if switching between positive and negative\n}\n```\n\n## Using stores from other stores\nEvery store can use any other store, without worrying about provider order.\nJust use the store's hook inside the other store:\n```javascript\nconst useCurrentUser = createStore(() => ...);\nconst usePosts = createStore(() => ...);\n\nconst useCurrentUserPosts = createStore(() => {\n  const currentUser = useCurrentUser();\n  const posts = useCurrentUser();\n  \n  return ...\n});\n```\n\n# Docs\nCheck out the full docs here:\n[https://reusablejs.github.io/reusable](https://reusablejs.github.io/reusable)\n\n\n# What about hooks+Context?\nUsing plain context is not a best solution for state management, that led us to write this library:\n- When managing global state using Context in a large app, you will probably have many small, single-purpose providers. Soon enough you'll find a Provider wrapper hell.\n- When you order the providers vertically, you can’t dynamically choose to depend on each other without changing the order, which might break things.\n- Context doesn't support selectors, render bailout, or debouncing\n\n## Feedback / Contributing:\nWe would love your feedback / suggestions\nPlease open an issue for discussion before submitting a PR\nThanks\n","readmeFilename":"README.md","gitHead":"634d783d19ca2365ca43c0a8e243736722d2b794","_id":"reusable@1.0.0-alpha.14","_nodeVersion":"11.11.0","_npmVersion":"6.7.0","dist":{"integrity":"sha512-z4oTBSN3Kh6kkOyOTZIFssdiFdjkYmjRtg0H8bocdWJPly+tqMn/VquuTCcenchBs6INQukytX07P0SsTUD00w==","shasum":"4d3994736c7a24c061149451f28a7c1623ba4d82","tarball":"https://registry.npmjs.org/reusable/-/reusable-1.0.0-alpha.14.tgz","fileCount":21,"unpackedSize":77146,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdBQeACRA9TVsSAnZWagAACwIP/16CyGGqOLHZ6shGoZC/\n2WXB9HpDCKbw4jJ44NiGel0yz/Bfn9+L7hDqJtr4kEQU8dJRax1ERQx9WjuI\nuLrgFw6mwkoV+TrjdRWYRwD63zH3Ks6O3XpE/+k+vaXE8AVMgFSyJS+cDwfh\n70BPdp6R728eIt52IoFBYK+CV7hMhSlze/AzF/rLhG1FB1mhOBeZV4fYjKh/\n5LXIaD0Xnd/lBR2iljODPTFEaSLzDmpGz01nBX2wnPGFUhR2ub40mWS450Ur\ntVwIPy9ZacxvgtHh3rd2HG44C246R81qMR9nR9y4Q+/RQXTekC0M5+CJ9u5g\np4dXPWSpl4zYiFG0xqhUOKOAERCGM8NKif/hePI9zJVejuShzec/ma+vDwuq\n5SLcbiEGp1KMunRdOhK6ISX7yDH36p5dVDIteYvEecUUeQ+IqcIYxR0czhu1\nSGhFoeDbeeIA939gFJwSBvmljEWh5TLuT6H7QxXTok7avXFVeB02np/1REZF\nxGGsGOifp/iiPXZRuQZj4SLMRKhQFm0w7SOwar/LuT0RSX6sCr1prfz9zq20\n+g84DFtDtdjQvqfYvTMvGj2tn5yGzi2qWVoOLR4UJGbikSh8JuqxyLCLys/o\nbZgmEGST6cex155Iz+ZTfwQdzWpnf2yWUJCzmJxdpAP21FSSTq/67h+AVSwA\nVdwV\r\n=gp/G\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQD7JVD1fbVhPNjVsL+c4YJc67vAGF9M9SIpr7/dI0JZ/gIgMKEQTxqbvAeYRIvxjDv+vBtXUAOzVDzF1bBVn0o/Jnc="}]},"maintainers":[{"email":"maayan@glikm.com","name":"morsdyce"}],"_npmUser":{"name":"adamklein","email":"adamklein.mail@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/reusable_1.0.0-alpha.14_1560610687875_0.9806377274108946"},"_hasShrinkwrap":false},"1.0.0-alpha.15":{"name":"reusable","version":"1.0.0-alpha.15","description":"[![Build Status](https://circleci.com/gh/reusablejs/reusable.svg?style=svg)](https://circleci.com/gh/reusablejs/reusable) [![npm version](https://badge.fury.io/js/reusable.svg)](https://badge.fury.io/js/reusable)","keywords":[],"main":"dist/index.js","source":"src/index.ts","unpkg":"dist/reusable.umd.js","types":"dist/index.d.ts","dependencies":{"@babel/helper-module-imports":"^7.0.0","babel-plugin-reusable":"1.0.0-alpha.8"},"peerDependencies":{"react":">= 16.8","react-dom":">= 16.8"},"devDependencies":{"@babel/core":"^7.4.0","@babel/plugin-proposal-class-properties":"^7.4.4","@babel/preset-env":"^7.4.2","@babel/preset-react":"^7.0.0","@types/jest":"^24.0.13","@types/node":"^12.0.3","@types/react":"^16.8.19","babel-plugin-macros":"^2.5.1","babel-plugin-tester":"^6.0.1","concurrently":"^4.1.0","jest":"^24.8.0","lodash":"^4.17.11","microbundle":"^0.11.0","parcel":"^1.12.3","prettier":"^1.16.4","react":"^16.8.5","react-dom":"^16.8.5","react-hooks-testing-library":"^0.5.0","react-test-renderer":"^16.8.6","ts-jest":"^24.0.2"},"scripts":{"example":"parcel ./example/index.html --out-dir exampleDist","build":"microbundle --external all --jsx react","build:dev":"microbundle watch --external all --jsx react","sandbox":"cd sandbox && npm start","dev":"concurrently 'npm run build:dev' 'npm run sandbox'","docs:publish":"cd website && npm run build && USE_SSH=true npm run publish-gh-pages","docs:dev":"cd website && npm start","test":"jest"},"readme":"[![Build Status](https://circleci.com/gh/reusablejs/reusable.svg?style=svg)](https://circleci.com/gh/reusablejs/reusable)\n[![npm version](https://badge.fury.io/js/reusable.svg)](https://badge.fury.io/js/reusable)\n\n# What?!\nReusable is a solution for state management, based on React Hooks.\n\nIt allows you to transform your custom hooks to singleton stores, and subscribe to them directly from any component.\n\nThe benefits:  \n- Stores are decoupled from component tree\n- You can use selectors and bail out of render\n- Stores can co-depend without worrying about provider order\n- It's easy to create packages that rely on global state, and plug them into apps seamlessly\n\n# Show me the code!\nWrap your app with a provider:\n```javascript\nconst App = () => (\n  <ReusableProvider> {/* no initialization code, stores automatically plug into the top provider */}\n    ...\n  </ReusableProvider>\n)\n```\n\nAnd just pass your custom hooks to `createStore`:\n\n```javascript\nconst useCounter = createStore(() => {\n  const [counter, setCounter] = useState(0);\n  \n  return {\n    counter,\n    increment: () => setCounter(prev => prev + 1)\n  }\n});\n```\n\nThen you get a singleton store, and a hook that subscribes directly to that store:\n```javascript\nconst Comp1 = () => {\n  const something = useCounter();\n}\n\nconst Comp2 = () => {\n  const something = useCounter(); // same something\n}\n```\n\n## Selectors\nYou can also use selectors, and your component will re-render only if the return value changed:  \n\n```javascript\nconst Comp1 = () => {\n  const isPositive = useCounter(state => state.counter > 0);\n   // Will only re-render if switching between positive and negative\n}\n```\n\n## Using stores from other stores\nEvery store can use any other store, without worrying about provider order.\nJust use the store's hook inside the other store:\n```javascript\nconst useCurrentUser = createStore(() => ...);\nconst usePosts = createStore(() => ...);\n\nconst useCurrentUserPosts = createStore(() => {\n  const currentUser = useCurrentUser();\n  const posts = useCurrentUser();\n  \n  return ...\n});\n```\n\n# Docs\nCheck out the full docs here:\n[https://reusablejs.github.io/reusable](https://reusablejs.github.io/reusable)\n\n\n# What about hooks+Context?\nUsing plain context is not a best solution for state management, that led us to write this library:\n- When managing global state using Context in a large app, you will probably have many small, single-purpose providers. Soon enough you'll find a Provider wrapper hell.\n- When you order the providers vertically, you can’t dynamically choose to depend on each other without changing the order, which might break things.\n- Context doesn't support selectors, render bailout, or debouncing\n\n## Feedback / Contributing:\nWe would love your feedback / suggestions\nPlease open an issue for discussion before submitting a PR\nThanks\n","readmeFilename":"README.md","gitHead":"634d783d19ca2365ca43c0a8e243736722d2b794","_id":"reusable@1.0.0-alpha.15","_nodeVersion":"11.11.0","_npmVersion":"6.7.0","dist":{"integrity":"sha512-gE2xsqsODk3GQKcNenN3msDgak0lhi4WL0UEQMNZKFATkpBQlwbE2tJMD3hMu7rnxYv4NDnfqkYrqDjyxIARzg==","shasum":"37cf752e716e912afb3820803f9010d1d53ad2d9","tarball":"https://registry.npmjs.org/reusable/-/reusable-1.0.0-alpha.15.tgz","fileCount":21,"unpackedSize":77146,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdBQnBCRA9TVsSAnZWagAA6oAP/2f1mOM8z9vhGwwQxgDF\n9lBr+4F5L6RuBdwaY2PP2aw5RgcD+Bp/Ns6KJk/1Uj6Hg/t5hVh/gZlr5tto\nTtbG9i3ed4WsVzkJdc7OBY04zRfUO+r/V4KcFh9HdL0Maa0z/ufDe7VNORh6\nUXuBpE9ttYS7GXELCE0GLt6VbALo7QpNnwGsLa9Nh7s5Avz1yUeTeBBBCMEf\nOi2BTkU5d9E3QZF/Q5NvKohCB1KWh0jEZFhP3OwRJVdyApV5NnbufRWQakh0\n5/p5zmihfbB//PpyWohoWga+G7d3S3gMnzoup4Jo7a2FqEzuZFfvpP8WlA3l\ndd1/Q3Um8+Ngoc14LS2JiXCKHvERuXZ0vkQQPP/BaDrz+4qCh6M40aOeLES8\nN4Y3Q0cfaV7nF8u/O1iYMfd8NvddaV8SVB/WfcA0GWfcd0KiO1vSg5CXUFqj\nU/tCJzJ11+w99g7BXXPPK9GuL2OuHJbZzfmBzF1E6TtYMDdhLxFr7XoXkzwG\n3wof/nDmXIquL/ofWrH1o27Tb7oo8sbzNhGvfwM2OT11nJ51xCaHN8Pc2QuP\nyjJn0dqlAEH8IOOMTsTJsGGbR80G8y3DBDwqcWtNipg8cnvUDVxWGe4yxNhd\nKpLibAnUEam47YEvJP8VJfqQBGEIBJ3H+XwHPlIKMUaXLBOrZfKdc7l4IWJR\n0rn3\r\n=n+fd\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIAEcYECuIVlrgZyZXuFKNt5J0WbY3W9bZ87liR8ASx0eAiEAux02sTiTOq4BWPtgZlRqymt6/CJNBp0zHQw8p5bNeWQ="}]},"maintainers":[{"email":"maayan@glikm.com","name":"morsdyce"}],"_npmUser":{"name":"adamklein","email":"adamklein.mail@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/reusable_1.0.0-alpha.15_1560611265259_0.7925570427254269"},"_hasShrinkwrap":false},"1.0.0":{"name":"reusable","version":"1.0.0","description":"[![Build Status](https://circleci.com/gh/reusablejs/reusable.svg?style=svg)](https://circleci.com/gh/reusablejs/reusable) [![npm version](https://badge.fury.io/js/reusable.svg)](https://badge.fury.io/js/reusable)","keywords":[],"main":"dist/index.js","source":"src/index.ts","unpkg":"dist/reusable.umd.js","types":"dist/index.d.ts","dependencies":{"@babel/helper-module-imports":"^7.0.0","babel-plugin-reusable":"1.0.0-alpha.8"},"peerDependencies":{"react":">= 16.8","react-dom":">= 16.8"},"devDependencies":{"@babel/core":"^7.4.0","@babel/plugin-proposal-class-properties":"^7.4.4","@babel/preset-env":"^7.4.2","@babel/preset-react":"^7.0.0","@types/jest":"^24.0.13","@types/node":"^12.0.3","@types/react":"^16.8.19","babel-plugin-macros":"^2.5.1","babel-plugin-tester":"^6.0.1","concurrently":"^4.1.0","jest":"^24.8.0","js-yaml":"^3.13.1","lodash":"^4.17.11","microbundle":"^0.11.0","parcel":"^1.12.3","prettier":"^1.16.4","react":"^16.8.5","react-dom":"^16.8.5","react-hooks-testing-library":"^0.5.0","react-test-renderer":"^16.8.6","relative-deps":"^0.2.0","ts-jest":"^24.0.2"},"scripts":{"example":"parcel ./example/index.html --out-dir exampleDist","build":"microbundle --external all --jsx react","build:dev":"microbundle watch --external all --jsx react","sandbox":"cd sandbox && npm start","dev":"concurrently 'npm run build:dev' 'npm run sandbox'","docs:publish":"cd website && npm run build && USE_SSH=true npm run publish-gh-pages","docs:dev":"cd website && npm start","test":"jest"},"gitHead":"4bf45a240c96d1c407492c1df0b0547b767fffab","_id":"reusable@1.0.0","_nodeVersion":"11.11.0","_npmVersion":"6.7.0","dist":{"integrity":"sha512-I13xP1/+tCGxTF7IDyNjrz7/ZIIMwUMMAcBT8OLTFhnrrs8TYE/jn3mNz84gm73QaRPJOsHZSeMZWGJI4Ddebg==","shasum":"c5640d3dadf4934561821d74c5366e3760e1fd7c","tarball":"https://registry.npmjs.org/reusable/-/reusable-1.0.0.tgz","fileCount":22,"unpackedSize":82582,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeSq9tCRA9TVsSAnZWagAATawQAIQl4g3t8+jdsLbJnwZ5\nDskSoFgqqZpaXN4VXX5TGfZW+0SYVh6G/UjOzE2r7Rl25CP5/v4Op3QEdDdG\nEu2B5sOmA54PnlET4IMxBKsiB4+eY/cxju201Ryf2EAAcJXgeyqag1UZuFMs\nn6f7JhwDwGOKwcmWWVYfSeV3gQtbECka1j39VFr4OX5s45m3pSt+nmxWaybl\ngXYARVADw9WHglOfa2gi7mnak84ccqSKBQiCzgnxYgjiqrRHQrK2TKJm9akl\n7IPZJXbDylcLo81ob0wRNjSS9MwotXifbLgK7blDF1yiWtgLVHgpLbn4nNv0\nfXDttYqHgAVUauQwTxYyugmUlyBVeI/O5Hzuod2Pc1AkSaikRih053lQ+X+o\nzZn8xF2PBcmty7sPHwGUA1yf6hUqhtuLwagl0Vb47HUS0fbGKntQ0UTfmBWF\nsBvufeGKvsZsSdkNA0f1UmfYFH/xKm3hi8mI/ax5HJ/RAoz6T5+hDkH5cU39\n50w1TAlva/d2VRo3ylFaRuUdx4gQ/ULD5KCcymosZxVHYq/NFy2MVLD8AmPL\n+nmPsehUxaiMaRDz/HZ463B6t9Gz+XKEcgWamCJ9B5rm9OH/LkjNN4qVadmv\nJa5uKljk6XmcBh6/fSK6fkthxxwSCrDEJjIIWnoLLuKa0a5HrIDQlxclj56F\nB4af\r\n=Wzg3\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDK+3yd9JDdkWjpbFb2kbz6vPuwFrfDeTVRkJjI6ZAdiAIhAMSQljK/kDOmsxL0jO5PL1UyVLQXa4Nr6lTFQaOm0Dab"}]},"maintainers":[{"email":"maayan@glikm.com","name":"morsdyce"}],"_npmUser":{"name":"adamklein","email":"adamklein.mail@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/reusable_1.0.0_1581952876619_0.07480626429805182"},"_hasShrinkwrap":false},"1.0.1":{"name":"reusable","homepage":"https://github.com/reusablejs/reusable","version":"1.0.1","description":"Reusable is a library for state management using React hooks","license":"MIT","keywords":["react","hooks","state management","react hooks","store"],"main":"dist/index.js","source":"src/index.ts","unpkg":"dist/reusable.umd.js","types":"dist/index.d.ts","dependencies":{"@babel/helper-module-imports":"^7.0.0","babel-plugin-reusable":"1.0.0-alpha.8"},"peerDependencies":{"react":">= 16.8","react-dom":">= 16.8"},"devDependencies":{"@babel/core":"^7.4.0","@babel/plugin-proposal-class-properties":"^7.4.4","@babel/preset-env":"^7.4.2","@babel/preset-react":"^7.0.0","@types/jest":"^24.0.13","@types/node":"^12.0.3","@types/react":"^16.8.19","babel-plugin-macros":"^2.5.1","babel-plugin-tester":"^6.0.1","concurrently":"^4.1.0","jest":"^24.8.0","js-yaml":"^3.13.1","lodash":"^4.17.11","microbundle":"^0.11.0","parcel":"^1.12.3","prettier":"^1.16.4","react":"^16.8.5","react-dom":"^16.8.5","react-hooks-testing-library":"^0.5.0","react-test-renderer":"^16.8.6","relative-deps":"^0.2.0","ts-jest":"^24.0.2"},"scripts":{"example":"parcel ./example/index.html --out-dir exampleDist","build":"microbundle --external all --jsx react","build:dev":"microbundle watch --external all --jsx react","sandbox":"cd sandbox && npm start","dev":"concurrently 'npm run build:dev' 'npm run sandbox'","docs:publish":"cd website && npm run build && USE_SSH=true npm run publish-gh-pages","docs:dev":"cd website && npm start","test":"jest","prepublishOnly":"npm run build && npm test"},"gitHead":"debaf59cf57df7f9b84f1579c599dee120d06759","_id":"reusable@1.0.1","_nodeVersion":"11.11.0","_npmVersion":"6.7.0","dist":{"integrity":"sha512-dTLwg8ma7QKM2PxpU0VWO7wmIhEy6qBS2d2Nd7IX8As4WOpjXHgVFQtv+TeF/IVYjZWYwM1gskqbH3pECLtm2A==","shasum":"d02e0f162724612cc9ac5a9797b047cd3f885c98","tarball":"https://registry.npmjs.org/reusable/-/reusable-1.0.1.tgz","fileCount":22,"unpackedSize":82942,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJehuqJCRA9TVsSAnZWagAAL60P/1GNQHTGQ7G92a3f7zba\nLQX/ASL8NyA4fk9dIU3YAOX1dz9jfudracvlmIrFz2hO3FS8o44PN9//YCHZ\nS3Dz2itqMQmseic5ohLMgsKkhyCOJk5EAzi2dj+KWOWL8n/oZWqkveugU+of\nJ/O/M8CDfrk5p8Hm1qpf8jIWHmg4ZhT4fhLVm25fQb2OLSJ/tEiSr9BrXhTD\nzmHQZGgUhYUki6FpAs/uVBIh3GgXwHpNIB20KuSPo1i2rMGqXpAdKupPjpa9\nPPqsqCRdTRjAYbMGqWCKhjJjg018nOegTemNMp3nKaCwxPIfJOsM1DwYHprq\n05r2tCJfBB7T0IwWjxNdL/6Kvu8mcVAcRMjGk1nIjgGjsag0ryf9wH6teOOK\n7rJcCXgiLfYd5BksVcEKKzxPDjK7itheVQRj5NBF92WM+pAlA3SQPx6+B7lY\nUv+6738beBKWp3C2/fW59+1FZyBhj2wlgCmSTxeMxvsIMG+zEz29JRz3+A8T\nlj5f/zlEV+6hXTnHoAEruhRuk1x56EBAwTYuQ7MMSn0ugwq+IHp6c1GpRb/W\nsZRj3zIlDopzyjJv9PyvUsN/mamyvFHJNE931s8AUH6hN9T0OZP//elVvrxA\n3fHurq+eViVV0V7tLZE1byla/mOTYwY0c9iYt7g8Kgv9LLdkZW1gL68UaQaG\n0sAB\r\n=FRc/\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCuHXc9EmX3ob/mrw48Oi4IGPiPxxu1/1gqf+dURUEL+AIhANWsxauApz5iKXkL+jUDEYtbRAGvrAcwsyK7DaBVI7V9"}]},"maintainers":[{"email":"adamklein.mail@gmail.com","name":"adamklein"},{"email":"maayan@glikm.com","name":"morsdyce"}],"_npmUser":{"name":"adamklein","email":"adamklein.mail@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/reusable_1.0.1_1585900168558_0.8604305247012551"},"_hasShrinkwrap":false},"1.1.0":{"name":"reusable","homepage":"https://github.com/reusablejs/reusable","version":"1.1.0","description":"Reusable is a library for state management using React hooks","license":"MIT","keywords":["react","hooks","state management","react hooks","store"],"main":"dist/index.js","source":"src/index.ts","unpkg":"dist/reusable.umd.js","types":"dist/index.d.ts","dependencies":{"@babel/helper-module-imports":"^7.0.0","babel-plugin-reusable":"1.0.0-alpha.8"},"peerDependencies":{"react":">= 16.8","react-dom":">= 16.8"},"devDependencies":{"@babel/core":"^7.4.0","@babel/plugin-proposal-class-properties":"^7.4.4","@babel/preset-env":"^7.4.2","@babel/preset-react":"^7.0.0","@types/jest":"^24.0.13","@types/node":"^12.0.3","@types/react":"18.0.0","@types/react-dom":"18.0.0","babel-plugin-macros":"^2.5.1","babel-plugin-tester":"^6.0.1","concurrently":"^4.1.0","jest":"^24.8.0","js-yaml":"^3.13.1","lodash":"^4.17.11","microbundle":"^0.15.1","parcel":"^1.12.3","prettier":"^1.16.4","react":"^18.0.0","react-dom":"^18.0.0","react-hooks-testing-library":"^0.5.0","react-test-renderer":"^16.8.6","relative-deps":"^0.2.0","ts-jest":"^24.0.2"},"scripts":{"example":"parcel ./example/index.html --out-dir exampleDist","build":"microbundle --external all --jsx React.createElement","build:dev":"microbundle watch --external all --jsx React.createElement","sandbox":"cd sandbox && npm start","dev":"concurrently 'npm run build:dev' 'npm run sandbox'","docs:publish":"cd website && npm run build && USE_SSH=true npm run publish-gh-pages","docs:dev":"cd website && npm start","test":"jest","prepublishOnly":"npm run build && npm test"},"gitHead":"0c24767dba77d445beb106f505ae1b631c0201ff","_id":"reusable@1.1.0","_nodeVersion":"18.16.0","_npmVersion":"9.5.1","dist":{"integrity":"sha512-AUmDrSW6Q6bOxZp70jvUFSwMGe4EOOpZ3OCQQQ2ryvh9MZzTSQv24bFMbdIJB3Vrl1sxxH4XiKLJjlX3DK0G7w==","shasum":"8fcefac9b473c4ea9d542db83ec2b79f7ebfe9c3","tarball":"https://registry.npmjs.org/reusable/-/reusable-1.1.0.tgz","fileCount":17,"unpackedSize":71980,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDf5qMMEHWP4GkU0ADWuRHgVD+7AsmNUlX/ysQZMW6kxAIgNyH7olc+unPUo49UG51eXxtY8K2r4ELQ7MHGfTSxvuE="}]},"_npmUser":{"name":"adamklein","email":"adamklein.mail@gmail.com"},"directories":{},"maintainers":[{"name":"morsdyce","email":"maayan@glikm.com"},{"name":"adamklein","email":"adamklein.mail@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/reusable_1.1.0_1712055567389_0.2393235895524095"},"_hasShrinkwrap":false}},"readme":"[![Build Status](https://circleci.com/gh/reusablejs/reusable.svg?style=svg)](https://circleci.com/gh/reusablejs/reusable)\n[![npm version](https://badge.fury.io/js/reusable.svg)](https://badge.fury.io/js/reusable)\n\n# Reusable - state management with hooks\n<img src=\"https://github.com/reusablejs/reusable/blob/master/website/static/img/reusable.png?raw=true\" width=\"120\"/>\n\n- Use hooks to manage the store\n  - One paradigm for both local and shared state, and an easier transition between the two\n- Use a single context provider and avoid nesting dozens of providers\n- Allow direct subscriptions with selectors for better re-render control\n\n\n# How to use\nPass a custom hook to `createStore`:\n\n```javascript\nconst useCounter = createStore(() => {\n  const [counter, setCounter] = useState(0);\n  useEffect(...)\n  const isOdd = useMemo(...);\n\n  return {\n    counter,\n    isOdd,\n    increment: () => setCounter(prev => prev + 1)\n    decrement: () => setCounter(prev => prev - 1)\n  }\n});\n```\n\nand get a singleton store, with a hook that subscribes directly to that store:\n```javascript\nconst MyComponent = () => {\n  const {counter, increment, decrement} = useCounter();\n}\n\nconst AnotherComponent = () => {\n  const {counter, increment, decrement} = useCounter(); // same counter\n}\n```\n\nthen wrap your app with a provider:\n```javascript\nconst App = () => (\n  <ReusableProvider>\n    ...\n  </ReusableProvider>\n)\n```\n\nNote there is no need to provide the store. Stores automatically plug into the top provider\n\n## Selectors\nFor better control over re-renders, use selectors:\n\n```javascript\nconst Comp1 = () => {\n  const isOdd = useCounter(state => state.isOdd);\n}\n```\nComp1 will only re-render if counter switches between odd and even\n\nuseCounter can take a second parameter that will override the comparison function (defaults to shallow compare): \n```javascript\nconst Comp1 = () => {\n  const counter = useCounter(state => state, (prevValue, newValue) => prevValue === newValue);\n}\n```\n\n\n## Using stores from other stores\nEach store can use any other store similar to how components use them:\n```javascript\nconst useCurrentUser = createStore(() => ...);\nconst usePosts = createStore(() => ...);\n\nconst useCurrentUserPosts = createStore(() => {\n  const currentUser = useCurrentUser();\n  const posts = usePosts();\n  \n  return ...\n});\n```\n\n# Demos\n**basic**  \n<a target=\"blank\" href=\"https://codesandbox.io/s/github/reusablejs/reusable/tree/master/examples/basic?fontsize=14&module=%2Fsrc%2Findex.js\">\n  <img alt=\"Edit basic\" src=\"https://codesandbox.io/static/img/play-codesandbox.svg\">\n</a>\n\n**TodoMVC**  \n\n<a target=\"blank\" href=\"https://codesandbox.io/s/github/reusablejs/reusable/tree/master/examples/todomvc?fontsize=14&module=%2Fsrc%2Findex.js\">\n  <img alt=\"Edit basic\" src=\"https://codesandbox.io/static/img/play-codesandbox.svg\">\n</a>\n\n# How does this compare to other state management solutions?\nCurrent state management solutions don't let you manage state using hooks, which causes you to manage local and global state differently, and have a costly transition between the two.\n\nReusable solves this by seemingly transforming your custom hooks into global stores.\n\n## What about hooks+Context?\nUsing plain context has some drawbacks and limitations, that led us to write this library:\n- Context doesn't support selectors, render bailout, or debouncing\n- When managing global state using Context in a large app, you will probably have many small, single-purpose providers. Soon enough you'll find a Provider wrapper hell.\n- When you order the providers vertically, you can’t dynamically choose to depend on each other without changing the order, which might break things.\n\n# How does it work\nReact hooks must run inside a component, and our store is based on a custom hook.  \nSo in order to have a store that uses a custom hook, we need to create a \"host component\" for each of our stores.  \nThe `ReusableProvider` component renders a `Stores` component, under which it will render one \"host component\" per store, which only runs the store's hook, and renders nothing to the DOM. Then, it uses an effect to update all subscribers with the new value. \nWe use plain pubsub stores under the hood, and do shallowCompare on selector values to decide if we re-render the subscribing component or not.\n\nNotice that the `ReusableProvider` uses a Context provider at the top-level, but it provides a stable ref that never changes. This means that changing store values, and even dynamically adding stores won't re-render your app.\n\n## Feedback / Contributing:\nWe would love your feedback / suggestions\nPlease open an issue for discussion before submitting a PR\nThanks\n","maintainers":[{"name":"morsdyce","email":"maayan@glikm.com"},{"name":"adamklein","email":"adamklein.mail@gmail.com"}],"time":{"modified":"2024-04-02T10:59:27.700Z","created":"2016-01-01T15:55:55.827Z","0.0.1":"2016-01-01T15:55:55.827Z","0.0.2":"2016-01-01T17:39:43.572Z","1.0.0-alpha.1":"2019-03-28T09:25:03.769Z","1.0.0-alpha.2":"2019-04-05T10:24:48.103Z","1.0.0-alpha.3":"2019-04-05T14:06:41.674Z","1.0.0-alpha.4":"2019-04-10T19:25:21.200Z","1.0.0-alpha.5":"2019-04-10T19:46:18.363Z","1.0.0-alpha.6":"2019-04-16T08:39:36.922Z","1.0.0-alpha.7":"2019-04-18T15:42:06.249Z","1.0.0-alpha.8":"2019-05-26T11:24:25.381Z","1.0.0-alpha.9":"2019-05-28T13:04:35.759Z","1.0.0-alpha.10":"2019-06-08T21:59:03.955Z","1.0.0-alpha.11":"2019-06-09T19:23:47.792Z","1.0.0-alpha.12":"2019-06-09T20:24:15.011Z","1.0.0-alpha.13":"2019-06-14T10:52:53.107Z","1.0.0-alpha.14":"2019-06-15T14:58:08.053Z","1.0.0-alpha.15":"2019-06-15T15:07:45.380Z","1.0.0":"2020-02-17T15:21:16.756Z","1.0.1":"2020-04-03T07:49:28.664Z","1.1.0":"2024-04-02T10:59:27.534Z"},"keywords":["react","hooks","state management","react hooks","store"],"readmeFilename":"README.md","homepage":"https://github.com/reusablejs/reusable","license":"MIT"}