{"_id":"use-context-selector","_rev":"55-d9eb87920f87611e7f73079ef4cb3440","name":"use-context-selector","dist-tags":{"latest":"2.0.0","next":"2.0.0-beta.0"},"versions":{"0.1.0":{"name":"use-context-selector","description":"React useContextSelector hook in userland","version":"0.1.0","author":{"name":"Daishi Kato"},"repository":{"type":"git","url":"git+https://github.com/dai-shi/use-context-selector.git"},"main":"./dist/index.js","module":"./src/index.js","types":"./src/index.d.ts","scripts":{"compile":"babel src -d dist","test":"npm run eslint && npm run tsc-test && npm run jest","eslint":"eslint --ext .js,.ts,.tsx --ignore-pattern dist .","jest":"jest","tsc-test":"tsc --project . --noEmit","examples:minimal":"DIR=01_minimal EXT=js webpack-dev-server","examples:typescript":"DIR=02_typescript webpack-dev-server"},"keywords":["react","context","hooks"],"license":"MIT","dependencies":{},"devDependencies":{"@babel/cli":"^7.4.4","@babel/core":"^7.4.5","@babel/preset-env":"^7.4.5","@babel/preset-react":"^7.0.0","@testing-library/react":"^8.0.1","@types/react":"^16.8.19","@types/react-dom":"^16.8.4","@typescript-eslint/eslint-plugin":"^1.10.2","@typescript-eslint/parser":"^1.10.2","babel-core":"^7.0.0-bridge.0","babel-eslint":"^10.0.1","babel-loader":"^8.0.6","eslint":"^5.16.0","eslint-config-airbnb":"^17.1.0","eslint-plugin-import":"^2.17.3","eslint-plugin-jsx-a11y":"^6.2.1","eslint-plugin-react":"^7.13.0","eslint-plugin-react-hooks":"^1.6.0","html-webpack-plugin":"^3.2.0","jest":"^24.8.0","react":"^16.8.6","react-dom":"^16.8.6","ts-loader":"^6.0.2","typescript":"^3.5.1","webpack":"^4.33.0","webpack-cli":"^3.3.4","webpack-dev-server":"^3.7.1"},"peerDependencies":{"react":">=16.8.6"},"babel":{"presets":["@babel/preset-env","@babel/preset-react"]},"gitHead":"d7686c9e9f5d818e5ca1e394514653e82fb1b844","bugs":{"url":"https://github.com/dai-shi/use-context-selector/issues"},"homepage":"https://github.com/dai-shi/use-context-selector#readme","_id":"use-context-selector@0.1.0","_nodeVersion":"8.16.0","_npmVersion":"6.9.0","dist":{"integrity":"sha512-1By81JpuaCglCCxKfYUlSbLGrGnppqbD/uncxGxPfqsNl2GCVDHUiboi39PUzCzZZIKbQElEgAViGDIfayIG8A==","shasum":"8a68b6fa3ff9744f2d914997ca58eae504788463","tarball":"https://registry.npmjs.org/use-context-selector/-/use-context-selector-0.1.0.tgz","fileCount":6,"unpackedSize":10839,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdHr8vCRA9TVsSAnZWagAAy90P/2uKoMWYwym3DEMQ4MMe\nuZ9vCz7O9MeXdJXaNcpT8JAssNn2jOgcdDIQzf/JHh09Uev6lQ20w9GpLcYH\n/MzZybrUwim3waKD8fNX8wWG6cCafpbi1UFtPNY8gV2FmTaPOBycfbxJ9qKk\nsYnjZG9UFMHyDsqYK8VnS7/6Tl7AyU1fkZJQBr2XM3ISQgw7dgJ22mwIkYxC\nX47wx/RwqtI52avl9vuAfHk8VKqFfly+wjhrh2AVpSXeXH0vKqbevNSwfsT1\nIi48f8UL4X173GDnYcyAM3EEL7qPTzwzSMEwQMOFya2CVMLKRU9Y1DiWLSRv\nzm+bUcY8+AFAnljx7MFy3wqxhKcKoCEM90QBqUS6DmoI6v3Q8OJGgcllZKOf\noc72k4t7W23XC6NNdS0sBOENr9JqG6wD+6TmWF7berDMmFEDh32x5ZgprLIY\ngjEimyqn/fUK8xJGn0FV6nRqcKs2lwnUN24biIFDPQZ0b4YwPNCCVvYdAkqP\nIgoL4J8wtxKxwMYe1Rf9ACGowYPO7urlM+Hu2a2Qd+P9LuZo6Z47jXKt5DFu\nOeshBNvwktq4G+iLEY9jzkb7wWXNMPN9CnH3d9mQ3gbU95GbzIEWzJgPbG6m\neC/0ZzX/n+O1cIMfH3eht6Pgee+MzDdhKwI8qgIhW5N70uGVFUqSbUwgrHRv\nqirw\r\n=s0pb\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIEs3AtYgQW3FWpFu8k4Xuwtx1swFaJ5zQ8o/gaCYxwz2AiEArTtmH4PT0nDFmSxOJcP598Ui6/DyiGJmp7FNXH75Cgo="}]},"maintainers":[{"name":"daishi","email":"daishi@axlight.com"}],"_npmUser":{"name":"daishi","email":"daishi@axlight.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/use-context-selector_0.1.0_1562296110562_0.8635189426908136"},"_hasShrinkwrap":false},"0.2.0":{"name":"use-context-selector","description":"React useContextSelector hook in userland","version":"0.2.0","author":{"name":"Daishi Kato"},"repository":{"type":"git","url":"git+https://github.com/dai-shi/use-context-selector.git"},"main":"./dist/index.js","module":"./dist/index.esm.js","browser":"./dist/index.umd.js","source":"./src/index.js","types":"./src/index.d.ts","scripts":{"compile":"microbundle build --format cjs,es,umd","test":"npm run eslint && npm run tsc-test && npm run jest","eslint":"eslint --ext .js,.ts,.tsx --ignore-pattern dist .","jest":"jest","tsc-test":"tsc --project . --noEmit","examples:minimal":"DIR=01_minimal EXT=js webpack-dev-server","examples:typescript":"DIR=02_typescript webpack-dev-server"},"keywords":["react","context","hooks"],"license":"MIT","dependencies":{},"devDependencies":{"@babel/cli":"^7.5.0","@babel/core":"^7.5.0","@babel/preset-env":"^7.5.0","@babel/preset-react":"^7.0.0","@testing-library/react":"^8.0.4","@types/react":"^16.8.23","@types/react-dom":"^16.8.4","@typescript-eslint/eslint-plugin":"^1.11.0","@typescript-eslint/parser":"^1.11.0","babel-core":"^7.0.0-bridge.0","babel-eslint":"^10.0.2","babel-loader":"^8.0.6","eslint":"^6.0.1","eslint-config-airbnb":"^17.1.1","eslint-plugin-import":"^2.18.0","eslint-plugin-jsx-a11y":"^6.2.3","eslint-plugin-react":"^7.14.2","eslint-plugin-react-hooks":"^1.6.1","html-webpack-plugin":"^3.2.0","jest":"^24.8.0","microbundle":"^0.12.0-next.3","react":"^16.8.6","react-dom":"^16.8.6","ts-loader":"^6.0.4","typescript":"^3.5.2","webpack":"^4.35.2","webpack-cli":"^3.3.5","webpack-dev-server":"^3.7.2"},"peerDependencies":{"react":">=16.8.6"},"babel":{"presets":[["@babel/preset-env",{"targets":"> 0.2%, not dead"}],"@babel/preset-react"]},"gitHead":"9db5cf0c3edab7a683f549e21188ee5811357046","bugs":{"url":"https://github.com/dai-shi/use-context-selector/issues"},"homepage":"https://github.com/dai-shi/use-context-selector#readme","_id":"use-context-selector@0.2.0","_nodeVersion":"8.16.0","_npmVersion":"6.9.0","dist":{"integrity":"sha512-BTjtE+IF0Smfx98rhNZx5Y1whqWuR/oZZmKUEf14+0aTsQoZYDwBfaV4HE6nlfX3rtrjTRNOzY9WLqCh3hlMRw==","shasum":"d7423366fdaf7cd346b9c2a97df6ca8e10973a11","tarball":"https://registry.npmjs.org/use-context-selector/-/use-context-selector-0.2.0.tgz","fileCount":11,"unpackedSize":22436,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdITOrCRA9TVsSAnZWagAApT8QAIGloqYbm4lm2Q8i5PNR\nLPZHo642rRbG4YKxMQAM1pDZxAssowQD9ryjfgrIHALeReHuvK+0SHVb5QCP\ngY5IAHUULE8wmlvPi0lMKf1RoAl4NqT+shxbR9fEcq6HwWuz1yoM8dnK16yt\nS4qbMRKR7STavk93se/UDGIfAgoHSmAF4DIjiUCnOukeGip2CJ5vrX7V4KRn\nS1WjVBqqCSinxwueE4NCnklZvfqt8nLFXMgY0jyzRABbCbB0faytlxiejc9X\nhGQ5FqUHwpWkFy0QLss6iPUWk4ADeA11yIm050EkFnpmWuvrKiWFKPIjLGyz\nEk8fOHnMUcEAAHiFXptq+TOpXVw8RZUxpahmwNi/7BWShunvDi57ASbKqdTD\nQJ9OdJVXZt9UHafXAZJ9RmNmO9iMcO6yOIWKc63C3INGD0frrInWY3IP8EJh\nrKp9jYk8Qf1bTALZ1w8Rg/WwIwMPbuZrl3DtLCaufNQf//C/XpBzO3IsLrzY\nGJi/+iDg45xPXMndSlesJdp2blcOJTvtkVo7Oez54y7SZbUOL1pi/EwVgvTF\nS2asdhTB6ZOO+c2wWZJeA8FSqoX5BHXBPGJygQL/r3UMMvpW1aYX8wPI8YxI\nmQBfHcIMLn7MHxArhRRXDTMQS1V5bdOya3mIZnPWydSDHqHUX09VRSExGuyM\n4kNZ\r\n=GOGd\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCkNxuY67RmgCbK6L80++a9XSJ0pHyn1N7P7J0C3kJUgQIhAP2n8dpvKCi6XHAeuPimcuxcNQXX3zjR9tnlPE13EbPe"}]},"maintainers":[{"name":"daishi","email":"daishi@axlight.com"}],"_npmUser":{"name":"daishi","email":"daishi@axlight.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/use-context-selector_0.2.0_1562457002800_0.31581652672398586"},"_hasShrinkwrap":false},"0.3.0":{"name":"use-context-selector","description":"React useContextSelector hook in userland","version":"0.3.0","author":{"name":"Daishi Kato"},"repository":{"type":"git","url":"git+https://github.com/dai-shi/use-context-selector.git"},"main":"./dist/index.js","module":"./dist/index.esm.js","browser":"./dist/index.umd.js","source":"./src/index.js","types":"./src/index.d.ts","scripts":{"compile":"microbundle build --format cjs,es,umd","test":"npm run eslint && npm run tsc-test && npm run jest","eslint":"eslint --ext .js,.ts,.tsx --ignore-pattern dist .","jest":"jest","tsc-test":"tsc --project . --noEmit","examples:minimal":"DIR=01_minimal EXT=js webpack-dev-server","examples:typescript":"DIR=02_typescript webpack-dev-server"},"keywords":["react","context","hooks"],"license":"MIT","dependencies":{},"devDependencies":{"@babel/cli":"^7.5.5","@babel/core":"^7.5.5","@babel/preset-env":"^7.5.5","@babel/preset-react":"^7.0.0","@testing-library/react":"^8.0.5","@types/react":"^16.8.23","@types/react-dom":"^16.8.4","@typescript-eslint/eslint-plugin":"^1.12.0","@typescript-eslint/parser":"^1.12.0","babel-core":"^7.0.0-bridge.0","babel-eslint":"^10.0.2","babel-loader":"^8.0.6","eslint":"^6.0.1","eslint-config-airbnb":"^17.1.1","eslint-plugin-import":"^2.18.2","eslint-plugin-jsx-a11y":"^6.2.3","eslint-plugin-react":"^7.14.2","eslint-plugin-react-hooks":"^1.6.1","html-webpack-plugin":"^3.2.0","jest":"^24.8.0","microbundle":"^0.12.0-next.3","react":"^16.8.6","react-dom":"^16.8.6","ts-loader":"^6.0.4","typescript":"^3.5.3","webpack":"^4.36.1","webpack-cli":"^3.3.6","webpack-dev-server":"^3.7.2"},"peerDependencies":{"react":">=16.8.6"},"babel":{"presets":[["@babel/preset-env",{"targets":"> 0.2%, not dead"}],"@babel/preset-react"]},"gitHead":"f03aef3964b0d3a7a36408bab98263e32b09305a","bugs":{"url":"https://github.com/dai-shi/use-context-selector/issues"},"homepage":"https://github.com/dai-shi/use-context-selector#readme","_id":"use-context-selector@0.3.0","_nodeVersion":"8.16.0","_npmVersion":"6.9.0","dist":{"integrity":"sha512-TKmQejP9g3V2BzUK3ymrWko/0AqhO4uPgMMnWzicfu2BZZuv5KOGBi06bFWBQP1SD0WbYzkOLCApMOVm89U0DQ==","shasum":"2d37ebf7dee6f003035b0c59e2d8d060ee60338c","tarball":"https://registry.npmjs.org/use-context-selector/-/use-context-selector-0.3.0.tgz","fileCount":11,"unpackedSize":22886,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdMxNuCRA9TVsSAnZWagAA2PUP/1DfbyVBIG2FmHOrYou7\n0sUVEl4X4B3FietKmUyKOSjDrLXNATwUNrONrZHVFqI/SdYL5+FyTZqQzvwl\nvsImkdgjwXR+0GaL0najW2zTfLT0jUPywWTXnucpN3M1AgUiN+M9EKblkbd5\ne6W7MWD8ZPOG4Y0cwsByjMRi5/rcLCmJkuT3zcpxCqC66YlF5lY72MOJGZB4\nbxx/PWg2iMUqR67nfN8oZLe6B3PzdfdXgFbECCUQoZ/boATEwDwtLWLlCQQP\nOva8B9an712BGuvMK+cXHrjyTuvC1qxO2SWV2AoiHysGsdbl6GgFvQ1n6aBJ\nrhI4VJcwAVeOuITK8CSSAWfegJWNVscjThQVgCCXpzlYIvQqSiUkvTPFeqSZ\nvKO8j9BQOJWtCGJuyxVqAApf30UI4wKBQvCdDFmtEaITgOen9fj/NGxSvwDa\nQRKLePc8JkFVq3Bq67XY60yK1AMZ8AHwcr1EkyaFUF7vfgzPvkCrlWSYYyg0\nFElXQqZ0aMMwNQVkvVocZxbGMj8LSn2ZA7+uwVUpIImE2qQ2L0uIM9Qnpi44\n/+IqbHHMTxktVa+OeBP5efePpQByZEBA3NMHSNXUg6Cgbix1kzAWHlCcYSvV\nele/U42NKoRG53J/AdVbHQD7UItmUKr8mbBbBhLR2Bnxim2wHsMPGlQgeUbH\nDfgV\r\n=uvhf\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDI9v5u9CboBJImhdRHPThoVh7DcqeyGUzIZaN8hjWkIAIgK2g8SMNjOm2c9pkrLl5+DJJtSiTSe9yuvJwvrIPEFsk="}]},"maintainers":[{"name":"daishi","email":"daishi@axlight.com"}],"_npmUser":{"name":"daishi","email":"daishi@axlight.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/use-context-selector_0.3.0_1563628397420_0.994237283970395"},"_hasShrinkwrap":false},"0.4.0":{"name":"use-context-selector","description":"React useContextSelector hook in userland","version":"0.4.0","author":{"name":"Daishi Kato"},"repository":{"type":"git","url":"git+https://github.com/dai-shi/use-context-selector.git"},"main":"./dist/index.js","module":"./dist/index.esm.js","browser":"./dist/index.umd.js","source":"./src/index.js","types":"./src/index.d.ts","scripts":{"compile":"microbundle build --format cjs,es,umd","test":"npm run eslint && npm run tsc-test && npm run jest","eslint":"eslint --ext .js,.ts,.tsx --ignore-pattern dist .","jest":"jest","tsc-test":"tsc --project . --noEmit","examples:minimal":"DIR=01_minimal EXT=js webpack-dev-server","examples:typescript":"DIR=02_typescript webpack-dev-server"},"keywords":["react","context","hooks"],"license":"MIT","dependencies":{},"devDependencies":{"@babel/cli":"^7.5.5","@babel/core":"^7.5.5","@babel/preset-env":"^7.5.5","@babel/preset-react":"^7.0.0","@testing-library/react":"^8.0.5","@types/react":"^16.8.23","@types/react-dom":"^16.8.4","@typescript-eslint/eslint-plugin":"^1.13.0","@typescript-eslint/parser":"^1.13.0","babel-core":"^7.0.0-bridge.0","babel-eslint":"^10.0.2","babel-loader":"^8.0.6","eslint":"^6.1.0","eslint-config-airbnb":"^17.1.1","eslint-plugin-import":"^2.18.2","eslint-plugin-jsx-a11y":"^6.2.3","eslint-plugin-react":"^7.14.3","eslint-plugin-react-hooks":"^1.6.1","html-webpack-plugin":"^3.2.0","jest":"^24.8.0","microbundle":"^0.12.0-next.3","react":"^16.8.6","react-dom":"^16.8.6","ts-loader":"^6.0.4","typescript":"^3.5.3","webpack":"^4.36.1","webpack-cli":"^3.3.6","webpack-dev-server":"^3.7.2"},"peerDependencies":{"react":">=16.8.6"},"babel":{"presets":[["@babel/preset-env",{"targets":"> 0.2%, not dead"}],"@babel/preset-react"]},"gitHead":"bcc6e18320ba5baf1a42a8f410c4597949dd4088","bugs":{"url":"https://github.com/dai-shi/use-context-selector/issues"},"homepage":"https://github.com/dai-shi/use-context-selector#readme","_id":"use-context-selector@0.4.0","_nodeVersion":"8.16.0","_npmVersion":"6.9.0","dist":{"integrity":"sha512-Lisd8PFzMMRCfL3bOkYrKn4XN6WxnlhJoXIDDJGQ150yidtlVX9rZlDoWhVm4u9FYrQGyCl9Np9CGgmQoUB+Qw==","shasum":"b18025e8943d2ea2d56d693d7114bd710d8ef6b5","tarball":"https://registry.npmjs.org/use-context-selector/-/use-context-selector-0.4.0.tgz","fileCount":11,"unpackedSize":22993,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdNmFRCRA9TVsSAnZWagAAmYkP/1CKLXxK7TZzufPQn1Hj\n+Wu2ek0c6pRaEDvdIROO3tFC4PLUUH0beNO2dg0KRpBrsrMRRLe5RCiTBX+g\nivrsErQ4bWM89TuEdZyYEcMtq6L0aiM17/pwz1gCZvkLRb17zVH49RVuCIHn\n/KJ4RCMaHA/WSSBkfvnmqu9rTipyc7T0qUvdYa8NAjH8fLgD9X+twn9ZR20E\nNTq3LhxnK9hXhcmilGkTBP7rta88KiDDQ4TFKCF6142L5W1eJQIfo6xT8oyy\n50ePB5Js3Q4sXSuJ9y+m4fvqnpQwflU762GNbADnRYeZEk08wUfycP3zxVev\nhJFexoZZ6+2TJf/Violn0eJCtu5VPuMLKuR0iEYbRJIjMr+IhaSBUTmiDiJn\n8MizN0kWa60vmfCc1ziC1tkSOHGeXNSXd75AmP2pewOK6EBSryQ59obOdO+K\nSz3ynbeqYLQeSzBIe6USOsbvfSRULoNyI7yuTFoGtwhXqactg/dHlhI93xvf\nqXLe5zk+mIUWEAJ/MdFhB8/IlXz2gW6JBRr5MzLhH93em8X4rcGx94zUXdco\nppldqAcQP4rvIhv58OHlDgG1zn2KtOd0U1gSyZbw0Zxg+1LYPbYDQwUqrmC1\nUVq16jywltwBav0FFdmwem2PWNL2T5m7Id8o/9hXDC2IXXkJk8IwS4eRBP9f\nDrtD\r\n=FVzk\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIG9sE/QLljmSLhsjyrONkWhA0IJKug8JntULffF7ph8mAiEAndcJczmxLB7x9wBnf618K4PXVa6gW4sll5+dsGTH5N4="}]},"maintainers":[{"name":"daishi","email":"daishi@axlight.com"}],"_npmUser":{"name":"daishi","email":"daishi@axlight.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/use-context-selector_0.4.0_1563844944865_0.8988691025018964"},"_hasShrinkwrap":false},"1.0.0":{"name":"use-context-selector","description":"React useContextSelector hook in userland","version":"1.0.0","author":{"name":"Daishi Kato"},"repository":{"type":"git","url":"git+https://github.com/dai-shi/use-context-selector.git"},"main":"./dist/index.js","module":"./dist/index.esm.js","browser":"./dist/index.umd.js","source":"./src/index.js","types":"./src/index.d.ts","scripts":{"compile":"microbundle build --format cjs,es,umd","test":"npm run eslint && npm run tsc-test && npm run jest","eslint":"eslint --ext .js,.ts,.tsx --ignore-pattern dist .","jest":"jest","tsc-test":"tsc --project . --noEmit","apidoc":"documentation build --format md --markdown-toc false src/index.js | add-text-to-markdown README.md --section API --write","examples:minimal":"DIR=01_minimal EXT=js webpack-dev-server","examples:typescript":"DIR=02_typescript webpack-dev-server"},"keywords":["react","context","hooks"],"license":"MIT","dependencies":{},"devDependencies":{"@babel/cli":"^7.5.5","@babel/core":"^7.5.5","@babel/preset-env":"^7.5.5","@babel/preset-react":"^7.0.0","@testing-library/react":"^8.0.7","@types/react":"^16.8.24","@types/react-dom":"^16.8.5","@typescript-eslint/eslint-plugin":"^1.13.0","@typescript-eslint/parser":"^1.13.0","add-text-to-markdown":"^2.0.0","babel-core":"^7.0.0-bridge.0","babel-eslint":"^10.0.2","babel-loader":"^8.0.6","documentation":"^12.1.1","eslint":"^6.1.0","eslint-config-airbnb":"^17.1.1","eslint-plugin-import":"^2.18.2","eslint-plugin-jsx-a11y":"^6.2.3","eslint-plugin-react":"^7.14.3","eslint-plugin-react-hooks":"^1.6.1","html-webpack-plugin":"^3.2.0","jest":"^24.8.0","microbundle":"^0.12.0-next.3","react":"^16.8.6","react-dom":"^16.8.6","ts-loader":"^6.0.4","typescript":"^3.5.3","webpack":"^4.39.1","webpack-cli":"^3.3.6","webpack-dev-server":"^3.7.2"},"peerDependencies":{"react":">=16.8.0"},"babel":{"presets":[["@babel/preset-env",{"targets":"> 0.2%, not dead"}],"@babel/preset-react"]},"gitHead":"dfa3c1959f749e1478d19a9a4b4834dc322754d1","bugs":{"url":"https://github.com/dai-shi/use-context-selector/issues"},"homepage":"https://github.com/dai-shi/use-context-selector#readme","_id":"use-context-selector@1.0.0","_nodeVersion":"8.16.0","_npmVersion":"6.9.0","dist":{"integrity":"sha512-NG1rpUkSnw03Hj8wp1AunxNmWbzvvFbZG/Xzus4lSIRF2cDO3NJL3AA2esAOSnpPL0+aeYCBOhqLDxJhAudCWQ==","shasum":"dca5e2df484592ec68a7a3004a39618375ad8fc9","tarball":"https://registry.npmjs.org/use-context-selector/-/use-context-selector-1.0.0.tgz","fileCount":11,"unpackedSize":27222,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdRFKSCRA9TVsSAnZWagAAPRQP/3CA4M8covPOeDb2fs6c\nqN7cwXpa3QzM5dFU/2JWBiXO5O5SGxyrQeNGDcjJwvGzOeUsjI06UiZxsKfo\n+KLq12OqbD3n6t2yvDVfgbF6F6ipL3qdaGdP3z1Eqb2AY+Ynp5Rn6+oVvlZ4\n+NIRlgzjtT88u/1BA+Jafd05rfT9GMCqnvD/Bju+5eeg+RC163AK+LBtTDhK\nuV1uIFa/oF6cR5d7lpcnuGQcIERShnBmnBtKc6XrhKvEa6Gh9bNnZGVOhDec\nvzsgOAzoYwnPYencaBMzOrakIytqHMbY9QvocywNKItQUXXkxZuk4gyYU9fG\ni8jaYKrW337mrlvoA9qAojvt34ubPxTo224upjpcRuSPig8oHkc8aIV8sWrm\nXfODrQD+lSfz+q419IMl4FCTya7kfkuVA5HySCe5hg9f5X7JKlSoO1f/IuGi\nIbLYNMUQ2K0jNV31rV9jau/zZuX19UU5zC/Llt6fBvY9NAAiTf8KpelJ25Q2\nA72dB49FwAS2pPKZ/Lq8myKfUmQGu/yGSDdKgQxXGTQ9F+17bKItUgNMQ0bm\nNJUi6cmcVIX84L+KZHgbyo2zjpBjB+GZy+iHRb2M5EGDouYz8y3OJx5UjlS3\nv3YknkZRkYlTTvR3zRWL6wLhfEVEvUWcbzBeuQ8lfUUKnNtPx/9/GY2aOteg\njKIN\r\n=3DI3\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIHz7HEnHgUQL1ELzQXSUSy/+1Rlck2k5SZYzxhYLlKYvAiEAuPuDKugwUq1eiJQihU5RdjOPVAGaq2C+yds3yQtDXEw="}]},"maintainers":[{"name":"daishi","email":"daishi@axlight.com"}],"_npmUser":{"name":"daishi","email":"daishi@axlight.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/use-context-selector_1.0.0_1564758674119_0.7152578800643579"},"_hasShrinkwrap":false},"1.0.1":{"name":"use-context-selector","description":"React useContextSelector hook in userland","version":"1.0.1","author":{"name":"Daishi Kato"},"repository":{"type":"git","url":"git+https://github.com/dai-shi/use-context-selector.git"},"main":"./dist/index.js","module":"./dist/index.esm.js","browser":"./dist/index.umd.js","source":"./src/index.js","types":"./src/index.d.ts","scripts":{"compile":"microbundle build --format cjs,es,umd","test":"npm run eslint && npm run tsc-test && npm run jest","eslint":"eslint --ext .js,.ts,.tsx --ignore-pattern dist .","jest":"jest","tsc-test":"tsc --project . --noEmit","apidoc":"documentation build --format md --markdown-toc false src/index.js | add-text-to-markdown README.md --section API --write","examples:minimal":"DIR=01_minimal EXT=js webpack-dev-server","examples:typescript":"DIR=02_typescript webpack-dev-server"},"keywords":["react","context","hooks"],"license":"MIT","dependencies":{},"devDependencies":{"@babel/cli":"^7.6.2","@babel/core":"^7.6.2","@babel/preset-env":"^7.6.2","@babel/preset-react":"^7.0.0","@testing-library/react":"^9.2.0","@types/react":"^16.9.3","@types/react-dom":"^16.9.1","@typescript-eslint/eslint-plugin":"^2.3.1","@typescript-eslint/parser":"^2.3.1","add-text-to-markdown":"^2.0.0","babel-core":"^7.0.0-bridge.0","babel-loader":"^8.0.6","documentation":"^12.1.2","eslint":"^6.4.0","eslint-config-airbnb":"^18.0.1","eslint-plugin-import":"^2.18.2","eslint-plugin-jsx-a11y":"^6.2.3","eslint-plugin-react":"^7.14.3","eslint-plugin-react-hooks":"^2.0.1","html-webpack-plugin":"^3.2.0","jest":"^24.9.0","microbundle":"^0.12.0-next.3","react":"^16.9.0","react-dom":"^16.9.0","ts-loader":"^6.1.2","typescript":"^3.6.3","webpack":"^4.41.0","webpack-cli":"^3.3.9","webpack-dev-server":"^3.8.1"},"peerDependencies":{"react":">=16.8.0"},"babel":{"presets":[["@babel/preset-env",{"targets":"> 0.2%, not dead"}],"@babel/preset-react"]},"gitHead":"05e2afcf4c3e0c31b3b1de7b3939fd93e79b2fda","bugs":{"url":"https://github.com/dai-shi/use-context-selector/issues"},"homepage":"https://github.com/dai-shi/use-context-selector#readme","_id":"use-context-selector@1.0.1","_nodeVersion":"8.16.0","_npmVersion":"6.9.0","dist":{"integrity":"sha512-1kqu7JVg5n0wXAAYyPVTXMumqPMQw1SLCqAks8/v43AvVlWh/JERaMQA0OUdi3FxbVMK7PYxY5vC7FtH/51hBA==","shasum":"e179173c6e8f2d0a552ff90e9c1ad87581243913","tarball":"https://registry.npmjs.org/use-context-selector/-/use-context-selector-1.0.1.tgz","fileCount":11,"unpackedSize":28488,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdjhb2CRA9TVsSAnZWagAAxsQP/AjZ937hvFHWUic/DNjP\nMkUiwahbJn+T1UKlTmu9TJIGn+f4lFBVr75JJe0WysfWjlf2CSutEkQPjyh3\nsuZP4zYj9gklQ0reVVG8A5xDwuCn5UOwCpcjYQNjTMeJloro6NjpB3GNztTh\nWhChxbafRq+uibjPiZAKTU5E/mEZmvlIoyK8epTNSzyjGIQlMws79IctclZP\nwEeWjPaZktpwHZHHJvakpyt7HhWrR/BzVss8Q7Io93goDYXu/5x/kmMmYCvc\n028l6tXmfoS4kqMsxrToKOMckL5gSQuer/M2V5KYnh0XHptQLooiQKRxf3E1\n6TeJfAKUyw50/zuNKX3u/MIt+wlRHOHD3mkK2j6J4FzTQw3BnYMHWdt36L4t\ndKZTpzCYPCaVIu7Uvc6jCQ27BBngUammLXv/1DIbF9YeCnZM51peqQ/23SUP\nDvt7iGuGzAMSX15UyE2t3Mz1iQ+mvxxlOVnKYhnPiqZJf+x7D59xiq1oXYZj\ngg7kCM7ggzrkhIcATaCimPMUABzjoNYekyXatkuproeOIn0dHiDQ5gLaJsba\nTcF/9ngHfh8If/HwMUFxkeJ0U8t3QDnAWjLRmWh4Z9O5wUTC47nz82mKPA10\nxQDd5Pv/dDW4TMVvWw+WFskzA5r2VQ2Ret4KbIZW6U/8HjowGhfa2Y2eyZJ8\n4580\r\n=tbUx\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGuK+L+3TfpGH8boNT70tPA86yWoWgZLvU4s7VfK2qEWAiEAi8qurgN6ZkdK7M/9rsBfYW0qUnjjIaRpkHLhq/jd8g4="}]},"maintainers":[{"name":"daishi","email":"daishi@axlight.com"}],"_npmUser":{"name":"daishi","email":"daishi@axlight.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/use-context-selector_1.0.1_1569593078100_0.22027121766834457"},"_hasShrinkwrap":false},"1.1.0":{"name":"use-context-selector","description":"React useContextSelector hook in userland","version":"1.1.0","author":{"name":"Daishi Kato"},"repository":{"type":"git","url":"git+https://github.com/dai-shi/use-context-selector.git"},"main":"./dist/index.js","module":"./dist/index.esm.js","browser":"./dist/index.umd.js","source":"./src/index.js","types":"./src/index.d.ts","scripts":{"compile":"microbundle build --format cjs,es,umd","test":"run-s eslint tsc-test jest","eslint":"eslint --ext .js,.ts,.tsx --ignore-pattern dist .","jest":"jest","tsc-test":"tsc --project . --noEmit","apidoc":"documentation readme --section API --markdown-toc false src/index.js","examples:01_minimal":"DIR=01_minimal EXT=js webpack-dev-server","examples:02_typescript":"DIR=02_typescript webpack-dev-server"},"keywords":["react","context","hooks"],"license":"MIT","dependencies":{},"devDependencies":{"@babel/cli":"^7.8.4","@babel/core":"^7.8.4","@babel/preset-env":"^7.8.4","@babel/preset-react":"^7.8.3","@testing-library/react":"^9.4.1","@types/react":"^16.9.22","@types/react-dom":"^16.9.5","@typescript-eslint/eslint-plugin":"^2.20.0","@typescript-eslint/parser":"^2.20.0","babel-loader":"^8.0.6","documentation":"^12.1.4","eslint":"^6.8.0","eslint-config-airbnb":"^18.0.1","eslint-plugin-import":"^2.20.1","eslint-plugin-jsx-a11y":"^6.2.3","eslint-plugin-react":"^7.18.3","eslint-plugin-react-hooks":"^2.4.0","html-webpack-plugin":"^3.2.0","jest":"^25.1.0","microbundle":"^0.12.0-next.8","npm-run-all":"^4.1.5","react":"experimental","react-dom":"experimental","ts-loader":"^6.2.1","typescript":"^3.8.2","webpack":"^4.41.6","webpack-cli":"^3.3.11","webpack-dev-server":"^3.10.3"},"peerDependencies":{"react":">=16.8.0"},"babel":{"presets":[["@babel/preset-env",{"targets":"> 0.2%, not dead"}],"@babel/preset-react"]},"gitHead":"e241e11c513310f1f44adb81c1ff15b7c7647281","bugs":{"url":"https://github.com/dai-shi/use-context-selector/issues"},"homepage":"https://github.com/dai-shi/use-context-selector#readme","_id":"use-context-selector@1.1.0","_nodeVersion":"10.19.0","_npmVersion":"6.13.7","dist":{"integrity":"sha512-fwQxuxOQoBEY3y4GKnB7H2LOH6pVu2MpTjuMzCGKZIsUl9OaZtjklyqEfmg2FC1xeYAu/uEc1hCtbIOYG7LtzQ==","shasum":"14ff7e4fe63e428e5b36330ed8459b3194330b3b","tarball":"https://registry.npmjs.org/use-context-selector/-/use-context-selector-1.1.0.tgz","fileCount":11,"unpackedSize":30696,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeUx3vCRA9TVsSAnZWagAAVEsP/3BrtWfnj20xHL6/qsIX\n25cxOuwWWbJH8L61jOcW3KvOoVSBB5c+EkcmebixtkxK3Oz7rQIYlyrnKxSh\nOXFxHIwDVD2SM360z9fhDgwoAZQ7K5ONksbVQzSqFtmDpp01Kec4H7eVj4Ug\nQ9E+70QcTgNXasogP5ZawASKsYYIs75R8nOVtLAtWrzOZlMsJfvzQu62/i8R\nnJYXgJUIPNp0l+HC0C3OkEuVEjAPBmEiDN3GBxHS/UHqV/WLFBvi5e1EPK9t\n4/QK4VKx1InRlGuOmJbIxWkjNXqI59IRNuB/wNGqIu5idDsB7/NAhybPWARh\nobNZEkZrZmDWpJcLZYR1lFAvI53xdcRYl0G2fGD/OA0vPk8RpiDee1q3M8Tu\nRvWteUQofeW+joW1DN9KOcglRMZl9itovgtNlTZj85mzKrXH1POpwMEPkssC\na76p5MKnIUqlItRsnVX5tyz+tJtGqQYpjGAaUpoxlFqtPu62rUVSw9bB4x1o\nz3pc0AW+WL9dPl7nhFpODDYQpZ4Yb688E1j/j0E5BMEb9XX6nei9oRg6fOKH\n3c+zEkI2jUdNosGVFFNz8IUbtGF5lxEbIKkNUkwQa4U3pmRvCMMsp5PUSIou\nUN7P1BEQcjlO/sf4VJUgH9J/80iDEkXvcG6GezdUua78UYny2b3Svvpw5b9t\nkpmf\r\n=H4mS\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDoUdfd/In9gNFa2fU6e4UwTvB94wXTINuvLclvslj0GAiEAhyhh4NIFDDlyWRXADkbHUVMU8fFYMpDH2/nxaexkRVI="}]},"maintainers":[{"name":"daishi","email":"daishi@axlight.com"}],"_npmUser":{"name":"daishi","email":"daishi@axlight.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/use-context-selector_1.1.0_1582505455260_0.416364128078875"},"_hasShrinkwrap":false},"1.1.1":{"name":"use-context-selector","description":"React useContextSelector hook in userland","version":"1.1.1","author":{"name":"Daishi Kato"},"repository":{"type":"git","url":"git+https://github.com/dai-shi/use-context-selector.git"},"main":"./dist/index.js","module":"./dist/index.esm.js","browser":"./dist/index.umd.js","source":"./src/index.js","types":"./src/index.d.ts","scripts":{"compile":"microbundle build --format cjs,es,umd","test":"run-s eslint tsc-test jest","eslint":"eslint --ext .js,.ts,.tsx --ignore-pattern dist .","jest":"jest","tsc-test":"tsc --project . --noEmit","apidoc":"documentation readme --section API --markdown-toc false src/index.js","examples:01_minimal":"DIR=01_minimal EXT=js webpack-dev-server","examples:02_typescript":"DIR=02_typescript webpack-dev-server"},"keywords":["react","context","hooks"],"license":"MIT","dependencies":{},"devDependencies":{"@babel/cli":"^7.8.4","@babel/core":"^7.8.4","@babel/preset-env":"^7.8.4","@babel/preset-react":"^7.8.3","@testing-library/react":"^9.4.1","@types/react":"^16.9.22","@types/react-dom":"^16.9.5","@typescript-eslint/eslint-plugin":"^2.20.0","@typescript-eslint/parser":"^2.20.0","babel-loader":"^8.0.6","documentation":"^12.1.4","eslint":"^6.8.0","eslint-config-airbnb":"^18.0.1","eslint-plugin-import":"^2.20.1","eslint-plugin-jsx-a11y":"^6.2.3","eslint-plugin-react":"^7.18.3","eslint-plugin-react-hooks":"^2.4.0","html-webpack-plugin":"^3.2.0","jest":"^25.1.0","microbundle":"^0.12.0-next.8","npm-run-all":"^4.1.5","react":"experimental","react-dom":"experimental","ts-loader":"^6.2.1","typescript":"^3.8.2","webpack":"^4.41.6","webpack-cli":"^3.3.11","webpack-dev-server":"^3.10.3"},"peerDependencies":{"react":">=16.8.0"},"babel":{"presets":[["@babel/preset-env",{"targets":"> 0.2%, not dead"}],"@babel/preset-react"]},"gitHead":"8508b022224226380edc75e080aabbc9fb1bb05f","bugs":{"url":"https://github.com/dai-shi/use-context-selector/issues"},"homepage":"https://github.com/dai-shi/use-context-selector#readme","_id":"use-context-selector@1.1.1","_nodeVersion":"10.19.0","_npmVersion":"6.13.7","dist":{"integrity":"sha512-MDcSTShyTB+PMlbIeN0kWzTeognnXyH6ffZL+fHwaTegNRQvpzbELIZW80Bdmjn+xckxfVugfz2WqTXcFsA8UA==","shasum":"1180ad98dcc585aee39c458a3e5582392a1afcf9","tarball":"https://registry.npmjs.org/use-context-selector/-/use-context-selector-1.1.1.tgz","fileCount":12,"unpackedSize":31548,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeXPRFCRA9TVsSAnZWagAAbp0P/Aiv1h+DqkkJoQ4dpflt\nNGfqkrQ/BxuylmNm8XJMus/dMYBlzF2q12QLhexOpBfx0vUc2eMdudIhQYYg\nFZDQopXJThGktqoQ/pSuiFDnBu9j1Gl2qkFRvrIQbGvRYdvIgnOEIDWlPF6r\nAjigtbuNU/7oAj/4pYk96p3LX8qanERKV+99A2UMXgvdZDFCMceGUTxNFoHX\nNDR1iGtXtUsk83wL88smvoLLgp5ZSNazzCDT9VPXifR7ifBz6wB+MpJpbnoZ\nVtq/uhwvOWOYOq8+geiXkeox4RViUTZvmu4GcRRD2YomtM5jnKzVAEP3iiWL\nPWIfpvwnN3cvhyMQ9GPcsIt4NSG616D4lEE5pd7VOX8yKEFn7QhQ5VpxbUlc\n/EcYWAug/zIBgkgo7MYk85y6xF/BEpSYJxWawJNivmMhRD7i4laUCVmMM9Hn\nFONOxUYpBpaiU9TMmofp3Q1LZq9VkIR64iOvBX5sytD0wN4obEuBZStJqoFB\nCSC0YFLDcKYXlucuASey/gSQf/xNYjHNSCT7AQu62X3t7l3hIk4YY5W/0YEz\ne+tDrqKdngYRYokEvDhbE2BTzsPVRgb/LWcRIU/JD83vTIrIDzMuf78/AUM+\nydQe4JmLOmgwlAF0honMVMAvdmOdQGAFnGrWyi/FOK1Y3d8qXzK+/wGFjQbt\niLnI\r\n=+4w4\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDSVIcq8W3FEHNGV+gaWGtQ+n+KvVxZs281H9TP4lVFUwIga3jikmTQrmEA6Cn0cIQyBrsMb8qKFybtXB3NTiFeoew="}]},"maintainers":[{"name":"daishi","email":"daishi@axlight.com"}],"_npmUser":{"name":"daishi","email":"daishi@axlight.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/use-context-selector_1.1.1_1583150148527_0.8940952622401364"},"_hasShrinkwrap":false},"2.0.0-alpha.1":{"name":"use-context-selector","description":"React useContext with selector support in userland","version":"2.0.0-alpha.1","author":{"name":"Daishi Kato"},"repository":{"type":"git","url":"git+https://github.com/dai-shi/use-context-selector.git"},"source":"./src/index.ts","main":"./dist/index.js","module":"./dist/index.esm.js","browser":"./dist/index.umd.js","types":"./dist/src/index.d.ts","sideEffects":false,"scripts":{"compile":"microbundle build --format cjs,es,umd","test":"run-s eslint tsc-test jest","eslint":"eslint --ext .js,.ts,.tsx --ignore-pattern dist .","jest":"jest --preset ts-jest/presets/js-with-ts __tests__/*.tsx","tsc-test":"tsc --project . --noEmit","apidoc":"documentation readme --section API --markdown-toc false --parse-extension ts src/*.ts","examples:01_minimal":"DIR=01_minimal EXT=js webpack-dev-server","examples:02_typescript":"DIR=02_typescript webpack-dev-server"},"keywords":["react","context","hooks"],"license":"MIT","dependencies":{},"devDependencies":{"@testing-library/react":"^9.5.0","@types/jest":"^25.1.4","@types/react":"^16.9.23","@types/react-dom":"^16.9.5","@typescript-eslint/eslint-plugin":"^2.23.0","@typescript-eslint/parser":"^2.23.0","documentation":"^12.1.4","eslint":"^6.8.0","eslint-config-airbnb":"^18.0.1","eslint-plugin-import":"^2.20.1","eslint-plugin-jsx-a11y":"^6.2.3","eslint-plugin-react":"^7.19.0","eslint-plugin-react-hooks":"^2.5.0","html-webpack-plugin":"^3.2.0","jest":"^25.1.0","microbundle":"^0.12.0-next.8","npm-run-all":"^4.1.5","react":"experimental","react-dom":"experimental","ts-jest":"^25.2.1","ts-loader":"^6.2.1","typescript":"^3.8.3","webpack":"^4.42.0","webpack-cli":"^3.3.11","webpack-dev-server":"^3.10.3"},"peerDependencies":{"react":">=16.14.0"},"readme":"# use-context-selector\n\n[![Build Status](https://travis-ci.com/dai-shi/use-context-selector.svg?branch=master)](https://travis-ci.com/dai-shi/use-context-selector)\n[![npm version](https://badge.fury.io/js/use-context-selector.svg)](https://badge.fury.io/js/use-context-selector)\n[![bundle size](https://badgen.net/bundlephobia/minzip/use-context-selector)](https://bundlephobia.com/result?p=use-context-selector)\n\nReact useContext with selector support in userland\n\n## Introduction\n\nReact Context and useContext is often used to avoid prop drilling,\nhowever it's known that there's a performance issue.\nWhen a context value is changed, all components that useContext\nwill re-render.\n\nTo solve this issue,\n[useContextSelector](https://github.com/reactjs/rfcs/pull/119)\nis proposed and later proposed\n[Speculative Mode](https://github.com/reactjs/rfcs/pull/150)\nwith context selector support.\nThis library provides the API in userland.\n\nv1 uses `calculateChangedBits=()=>0` technique to stop propagation,\nwhile v2 uses `useMutableSource`.\n\n## Install\n\n```bash\nnpm install use-context-selector\n```\n\n## Usage\n\n```javascript\nimport React, { useState } from 'react';\nimport ReactDOM from 'react-dom';\n\nimport { createContext, useContextSelector } from 'use-context-selector';\n\nconst context = createContext(null);\n\nconst Counter1 = () => {\n  const count1 = useContextSelector(context, v => v[0].count1);\n  const setState = useContextSelector(context, v => v[1]);\n  const increment = () => setState(s => ({\n    ...s,\n    count1: s.count1 + 1,\n  }));\n  return (\n    <div>\n      <span>Count1: {count1}</span>\n      <button type=\"button\" onClick={increment}>+1</button>\n      {Math.random()}\n    </div>\n  );\n};\n\nconst Counter2 = () => {\n  const count2 = useContextSelector(context, v => v[0].count2);\n  const setState = useContextSelector(context, v => v[1]);\n  const increment = () => setState(s => ({\n    ...s,\n    count2: s.count2 + 1,\n  }));\n  return (\n    <div>\n      <span>Count2: {count2}</span>\n      <button type=\"button\" onClick={increment}>+1</button>\n      {Math.random()}\n    </div>\n  );\n};\n\nconst StateProvider = ({ children }) => {\n  const [state, setState] = useState({ count1: 0, count2: 0 });\n  return (\n    <context.Provider value={[state, setState]}>\n      {children}\n    </context.Provider>\n  );\n};\n\nconst App = () => (\n  <StateProvider>\n    <Counter1 />\n    <Counter2 />\n  </StateProvider>\n);\n\nReactDOM.render(<App />, document.getElementById('app'));\n```\n\n## Migrating from v1 to v2\n\nIn v1:\n\n```js\nuseContextSelector(context, state => state.count);\n```\n\nIn v2:\n```js\nuseContext(context, useCallback(state => state.count, []));\n```\n\nIn this case, you can (should) also define the selector function outside render.\n\n## API\n\n<!-- Generated by documentation.js. Update this documentation by updating the source code. -->\n\n### createContext\n\nThis creates a special context for selector-enabled `useContext`.\n\nIt doesn't pass its value but a ref of the value.\nUnlike the original context provider, this context provider\nexpects the context value to be immutable and stable.\n\n#### Parameters\n\n-   `defaultValue` **Value** \n\n#### Examples\n\n```javascript\nimport { createContext } from 'use-context-selector';\n\nconst PersonContext = createContext({ firstName: '', familyName: '' });\n```\n\n### useContext\n\nThis hook returns context value with optional selector.\n\nIt will only accept context created by `createContext`.\nIt will trigger re-render if only the selected value is referentially changed.\nThe selector must be stable.\nEither define selector outside render or wrap with `useCallback`.\n\nThe selector should return referentially equal result for same input for better performance.\n\n#### Parameters\n\n-   `context` **Context&lt;Value>** \n-   `selector` **function (value: Value): Selected**  (optional, default `identity as(value:Value)=>Selected`)\n\n#### Examples\n\n```javascript\nimport { useContext } from 'use-context-selector';\n\nconst firstName = useContext(PersonContext, state => state.firstName);\n```\n\n## Limitations\n\n-   In order to stop propagation, `children` of a context provider has to be either created outside of the provider or memoized with `React.memo`.\n-   Provider trigger re-renders only if the context value is referentially changed.\n-   Neither context consumers or class components are supported.\n-   The [stale props](https://react-redux.js.org/api/hooks#stale-props-and-zombie-children) issue isn't solved.\n-   Due to the current useMutableSource limitation, a selector can't return a function. (See `02_basic_spec` wrapping setState)\n-   Tearing is only avoided within the Provider tree. A value outside the Provider will tear. (`02_tearing_spec` fails)\n\n## Examples\n\nThe [examples](examples) folder contains working examples.\nYou can run one of them with\n\n```bash\nPORT=8080 npm run examples:01_minimal\n```\n\nand open <http://localhost:8080> in your web browser.\n\nYou can also try them in codesandbox.io:\n[01](https://codesandbox.io/s/github/dai-shi/use-context-selector/tree/master/examples/01_minimal)\n[02](https://codesandbox.io/s/github/dai-shi/use-context-selector/tree/master/examples/02_typescript)\n\n## Related projects\n\n-   [react-tracked](https://github.com/dai-shi/react-tracked)\n-   [reactive-react-redux](https://github.com/dai-shi/reactive-react-redux)\n","readmeFilename":"README.md","gitHead":"cbadd4d8d0d20abdb1606048829bae1f36ecff14","bugs":{"url":"https://github.com/dai-shi/use-context-selector/issues"},"homepage":"https://github.com/dai-shi/use-context-selector#readme","_id":"use-context-selector@2.0.0-alpha.1","_nodeVersion":"10.19.0","_npmVersion":"6.13.7","dist":{"integrity":"sha512-wIDs9RMw4oUJMm0G1EeDVvfvoWmBfh7cuJfLR9hfGQ6mgYirRTNycIlUzSmdK1PBbd2DRl31g8952LNVaHdF6w==","shasum":"4e3b161c91ae67b1606e7094eb7fcffb3bcbd7f9","tarball":"https://registry.npmjs.org/use-context-selector/-/use-context-selector-2.0.0-alpha.1.tgz","fileCount":12,"unpackedSize":32336,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeaYb/CRA9TVsSAnZWagAAwf8P/3858SlxuFga+f1k/KTo\nGj5mVQUT9SNZC145IApUzFooTYPamtCMILlKLieeqpsjPMAbKJKwJT2SF+7i\nvwhLIW5VEVC9etDsQWXlsKFq9m7ugbmLcgZfAQDF0se5t3anMN04fCHFFexa\nXEg4s918EIijWAyqjDxTHx3HLWvcIyo5Kk3n/Uifz/xUxiq11qLnRCP+t5O4\n4JOyQTOBWSZHZ9IG4T5krS1mVnlbi+yYB1mvowEqaoBeo6ijn3Qj60sfvPn3\nOHDTBkNmmtjBkTD0jrducXIgynqYsoCEWdEWTIxZFM/RMXjRNChEy4YBlfme\nlRTrzvvMVlwVohJxa+p2kQUmb6eJzD5Hw7ZHuoROiBAJlV0O+qsIX/qByulW\nwoMhQowvJL75hy8k3aCldOHANbCiXkSJ7kQ8Iwc43kDW3ZqKOE5xNgqtgjVP\nK0zOCbzczGckcEA2rp25zmT1u7h/Qr03HeM37wAuGvTawukRb6KReOIYj3mk\nb5wqaceq2FcLeS/qlu5Eaj85pEUoXSiinJ+4D/oZeOO0QOYWu8ZhIbsmXVUl\nqEFDTwOigQRnYCC8C5TIXbhHZZcUu/r0k0Tw97Llm3PrQo/AQjxrRpuuoGws\nfPlBP183MT6M/EIRZoqbEypGobz16NmU+hNkS8OW3OBGQG37h1jDQpOWRPxB\n6UZV\r\n=yjx/\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIC7OadXXOttqcuVopNXFgQ1eUQRh/rLk4jct0S8A9/M0AiEAoZcZbM17Qum8+3IqTuy8uEAzl9IdjoHKPKQVAzyHyiU="}]},"maintainers":[{"name":"daishi","email":"daishi@axlight.com"}],"_npmUser":{"name":"daishi","email":"daishi@axlight.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/use-context-selector_2.0.0-alpha.1_1583974142319_0.20015709106363921"},"_hasShrinkwrap":false},"2.0.0-alpha.2":{"name":"use-context-selector","description":"React useContext with selector support in userland","version":"2.0.0-alpha.2","publishConfig":{"tag":"next"},"author":{"name":"Daishi Kato"},"repository":{"type":"git","url":"git+https://github.com/dai-shi/use-context-selector.git"},"source":"./src/index.ts","main":"./dist/index.js","module":"./dist/index.esm.js","browser":"./dist/index.umd.js","types":"./dist/src/index.d.ts","sideEffects":false,"scripts":{"compile":"microbundle build --format cjs,es,umd","test":"run-s eslint tsc-test jest","eslint":"eslint --ext .js,.ts,.tsx --ignore-pattern dist .","jest":"jest --preset ts-jest/presets/js-with-ts __tests__/*.tsx","tsc-test":"tsc --project . --noEmit","apidoc":"documentation readme --section API --markdown-toc false --parse-extension ts src/*.ts","examples:01_minimal":"DIR=01_minimal EXT=js webpack-dev-server","examples:02_typescript":"DIR=02_typescript webpack-dev-server"},"keywords":["react","context","hooks"],"license":"MIT","dependencies":{},"devDependencies":{"@testing-library/react":"^9.5.0","@types/jest":"^25.1.4","@types/react":"^16.9.23","@types/react-dom":"^16.9.5","@types/scheduler":"^0.16.1","@typescript-eslint/eslint-plugin":"^2.23.0","@typescript-eslint/parser":"^2.23.0","documentation":"^12.1.4","eslint":"^6.8.0","eslint-config-airbnb":"^18.0.1","eslint-plugin-import":"^2.20.1","eslint-plugin-jsx-a11y":"^6.2.3","eslint-plugin-react":"^7.19.0","eslint-plugin-react-hooks":"^2.5.0","html-webpack-plugin":"^3.2.0","jest":"^25.1.0","microbundle":"^0.12.0-next.8","npm-run-all":"^4.1.5","react":"experimental","react-dom":"experimental","scheduler":"experimental","ts-jest":"^25.2.1","ts-loader":"^6.2.1","typescript":"^3.8.3","webpack":"^4.42.0","webpack-cli":"^3.3.11","webpack-dev-server":"^3.10.3"},"peerDependencies":{"react":">=16.14.0","scheduler":">=0.20.0"},"readme":"# use-context-selector\n\n[![Build Status](https://travis-ci.com/dai-shi/use-context-selector.svg?branch=master)](https://travis-ci.com/dai-shi/use-context-selector)\n[![npm version](https://badge.fury.io/js/use-context-selector.svg)](https://badge.fury.io/js/use-context-selector)\n[![bundle size](https://badgen.net/bundlephobia/minzip/use-context-selector)](https://bundlephobia.com/result?p=use-context-selector)\n\nReact useContext with selector support in userland\n\n## Introduction\n\nReact Context and useContext is often used to avoid prop drilling,\nhowever it's known that there's a performance issue.\nWhen a context value is changed, all components that useContext\nwill re-render.\n\nTo solve this issue,\n[useContextSelector](https://github.com/reactjs/rfcs/pull/119)\nis proposed and later proposed\n[Speculative Mode](https://github.com/reactjs/rfcs/pull/150)\nwith context selector support.\nThis library provides the API in userland.\n\nv1 uses `calculateChangedBits=()=>0` technique to stop propagation,\nwhile v2 uses `useMutableSource`.\n\n## Install\n\n```bash\nnpm install use-context-selector\n```\n\n## Usage\n\n```javascript\nimport React, { useState } from 'react';\nimport ReactDOM from 'react-dom';\n\nimport { createContext, useContextSelector } from 'use-context-selector';\n\nconst context = createContext(null);\n\nconst Counter1 = () => {\n  const count1 = useContextSelector(context, v => v[0].count1);\n  const setState = useContextSelector(context, v => v[1]);\n  const increment = () => setState(s => ({\n    ...s,\n    count1: s.count1 + 1,\n  }));\n  return (\n    <div>\n      <span>Count1: {count1}</span>\n      <button type=\"button\" onClick={increment}>+1</button>\n      {Math.random()}\n    </div>\n  );\n};\n\nconst Counter2 = () => {\n  const count2 = useContextSelector(context, v => v[0].count2);\n  const setState = useContextSelector(context, v => v[1]);\n  const increment = () => setState(s => ({\n    ...s,\n    count2: s.count2 + 1,\n  }));\n  return (\n    <div>\n      <span>Count2: {count2}</span>\n      <button type=\"button\" onClick={increment}>+1</button>\n      {Math.random()}\n    </div>\n  );\n};\n\nconst StateProvider = ({ children }) => {\n  const [state, setState] = useState({ count1: 0, count2: 0 });\n  return (\n    <context.Provider value={[state, setState]}>\n      {children}\n    </context.Provider>\n  );\n};\n\nconst App = () => (\n  <StateProvider>\n    <Counter1 />\n    <Counter2 />\n  </StateProvider>\n);\n\nReactDOM.render(<App />, document.getElementById('app'));\n```\n\n## Migrating from v1 to v2\n\nIn v1:\n\n```js\nuseContextSelector(context, state => state.count);\n```\n\nIn v2:\n\n```js\nuseContext(context, useCallback(state => state.count, []));\n```\n\nIn this case, you can (should) also define the selector function outside render.\n\n## API\n\n<!-- Generated by documentation.js. Update this documentation by updating the source code. -->\n\n### createContext\n\nThis creates a special context for selector-enabled `useContext`.\n\nIt doesn't pass its value but a ref of the value.\nUnlike the original context provider, this context provider\nexpects the context value to be immutable and stable.\n\n#### Parameters\n\n-   `defaultValue` **Value** \n\n#### Examples\n\n```javascript\nimport { createContext } from 'use-context-selector';\n\nconst PersonContext = createContext({ firstName: '', familyName: '' });\n```\n\n### useContext\n\nThis hook returns context value with optional selector.\n\nIt will only accept context created by `createContext`.\nIt will trigger re-render if only the selected value is referentially changed.\nThe selector must be stable.\nEither define selector outside render or wrap with `useCallback`.\n\nThe selector should return referentially equal result for same input for better performance.\n\n#### Parameters\n\n-   `context` **Context&lt;Value>** \n-   `selector` **function (value: Value): Selected**  (optional, default `identity as(value:Value)=>Selected`)\n\n#### Examples\n\n```javascript\nimport { useContext } from 'use-context-selector';\n\nconst firstName = useContext(PersonContext, state => state.firstName);\n```\n\n### wrapCallbackWithPriority\n\nA utility function to wrap a callback function with higher priority\n\nUse this for a callback that will change a value,\nwhich will be fed into context provider.\n\n#### Parameters\n\n-   `callback` **Callback** \n\n#### Examples\n\n```javascript\nimport { wrapCallbackWithPriority } from 'use-context-selector';\n\nconst wrappedCallback = wrapCallbackWithPriority(callback);\n```\n\n## Limitations\n\n-   In order to stop propagation, `children` of a context provider has to be either created outside of the provider or memoized with `React.memo`.\n-   Provider trigger re-renders only if the context value is referentially changed.\n-   Neither context consumers or class components are supported.\n-   The [stale props](https://react-redux.js.org/api/hooks#stale-props-and-zombie-children) issue isn't solved.\n-   Due to the current useMutableSource limitation, a selector can't return a function. (See `02_basic_spec` wrapping setState)\n-   Tearing is only avoided within the Provider tree. A value outside the Provider will tear. (`02_tearing_spec` fails)\n\n## Examples\n\nThe [examples](examples) folder contains working examples.\nYou can run one of them with\n\n```bash\nPORT=8080 npm run examples:01_minimal\n```\n\nand open <http://localhost:8080> in your web browser.\n\nYou can also try them in codesandbox.io:\n[01](https://codesandbox.io/s/github/dai-shi/use-context-selector/tree/master/examples/01_minimal)\n[02](https://codesandbox.io/s/github/dai-shi/use-context-selector/tree/master/examples/02_typescript)\n\n## Related projects\n\n-   [react-tracked](https://github.com/dai-shi/react-tracked)\n-   [reactive-react-redux](https://github.com/dai-shi/reactive-react-redux)\n","readmeFilename":"README.md","gitHead":"4adef152b3109e30b681b2846192caf9c1d2923b","bugs":{"url":"https://github.com/dai-shi/use-context-selector/issues"},"homepage":"https://github.com/dai-shi/use-context-selector#readme","_id":"use-context-selector@2.0.0-alpha.2","_nodeVersion":"10.19.0","_npmVersion":"6.14.3","dist":{"integrity":"sha512-htOUhhZ0Vuhe6jBbTGY3OTMuBEsy4atiGPUflUvDCxMXv3v8RUGjg2gOCexiK6ZwFgKhct2oxzOE9jcDXGdozQ==","shasum":"859f38e0d4e974afc34940b4a36793257c999fc2","tarball":"https://registry.npmjs.org/use-context-selector/-/use-context-selector-2.0.0-alpha.2.tgz","fileCount":12,"unpackedSize":40202,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeeVmSCRA9TVsSAnZWagAAeKEP/i6bYsh6qE1jKLEng/Br\nl1fQFTgs0x5B3pgtCIDo5xOh3Sz+VTwrajCnKV8ydy4cFm4N1S5IfBYU9QR4\nAJDwRgpA/Y+q37zS5apgI+kkoLqOG2ssBkCnlMawalP1P7GyaFxHGxZjqXKg\nLj+Ms6B3SqzwaNvdYjPV6IdIk/1JpgBbN9XhEgM89GFLZzHVkVgtItmTx60Y\nC59Ai6117IjMgGbHU9V2F/EUWvkIJi9TBsz1mPk6WYYvFBsSEc1fNQO2YqdS\n/9xwd4RQx7IGb40qZoVOl342Jw7Mm5gIPpn6U5f1WBU7Vb1k4mUb7j+UOCDy\nL4zI40/PtDeq456BYspnRuwSiuRnMo1SglBx9rwXJhFatJqqMP9PGL1FV5rW\njwn0pixCFnPE9UzK3kHc7bUPg+2u2hXsPdf6X1LnJo2PyIh4J42kTanc6JnS\nyw9CiY/OI9q/gPiQwds4Ag5KJ604Osp6Bs7qwn1PdIRUkSdxPJeW0eXKp7fX\nlbBKpoJoCPO7RtgaA1JttX7tZevvxDU1YcRkmeFIijV6kdCgFrzyu/VpldLt\n25lwdf2WGzPWmtZmY6zUHw+i2Des2JzOTWtlOA+/E/CkmXhTieGQ28zXUvQy\nVIDWi/8HqpGn6i69w9pIACDYkl0E7MMZg0cw9Aiv+kVCDWWg+eQeZodD/Vna\nB0GO\r\n=KWmg\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGbF57ihMGODn5AF738EOY/Is2nNe3yVQWwEF2gl80cQAiEAiD/3/PO6InW/C6+ZU8cwh0eiCgY1YAAxq6c8Rcv/bWs="}]},"maintainers":[{"name":"daishi","email":"daishi@axlight.com"}],"_npmUser":{"name":"daishi","email":"daishi@axlight.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/use-context-selector_2.0.0-alpha.2_1585011089743_0.9697349103399702"},"_hasShrinkwrap":false},"2.0.0-alpha.3":{"name":"use-context-selector","description":"React useContext with selector support in userland","version":"2.0.0-alpha.3","publishConfig":{"tag":"next"},"author":{"name":"Daishi Kato"},"repository":{"type":"git","url":"git+https://github.com/dai-shi/use-context-selector.git"},"source":"./src/index.ts","main":"./dist/index.js","module":"./dist/index.esm.js","browser":"./dist/index.umd.js","types":"./dist/src/index.d.ts","sideEffects":false,"scripts":{"compile":"microbundle build --format cjs,es,umd","test":"run-s eslint tsc-test jest","eslint":"eslint --ext .js,.ts,.tsx --ignore-pattern dist .","jest":"jest --preset ts-jest/presets/js-with-ts __tests__/*.tsx","tsc-test":"tsc --project . --noEmit","apidoc":"documentation readme --section API --markdown-toc false --parse-extension ts src/*.ts","examples:01_minimal":"DIR=01_minimal EXT=js webpack-dev-server","examples:02_typescript":"DIR=02_typescript webpack-dev-server"},"keywords":["react","context","hooks"],"license":"MIT","dependencies":{},"devDependencies":{"@testing-library/react":"^9.5.0","@types/jest":"^25.1.4","@types/react":"^16.9.23","@types/react-dom":"^16.9.5","@types/scheduler":"^0.16.1","@typescript-eslint/eslint-plugin":"^2.23.0","@typescript-eslint/parser":"^2.23.0","documentation":"^12.1.4","eslint":"^6.8.0","eslint-config-airbnb":"^18.0.1","eslint-plugin-import":"^2.20.1","eslint-plugin-jsx-a11y":"^6.2.3","eslint-plugin-react":"^7.19.0","eslint-plugin-react-hooks":"^2.5.0","html-webpack-plugin":"^3.2.0","jest":"^25.1.0","microbundle":"^0.12.0-next.8","npm-run-all":"^4.1.5","react":"experimental","react-dom":"experimental","scheduler":"experimental","ts-jest":"^25.2.1","ts-loader":"^6.2.1","typescript":"^3.8.3","webpack":"^4.42.0","webpack-cli":"^3.3.11","webpack-dev-server":"^3.10.3"},"peerDependencies":{"react":">=16.14.0","scheduler":">=0.20.0"},"readme":"# use-context-selector\n\n[![Build Status](https://travis-ci.com/dai-shi/use-context-selector.svg?branch=master)](https://travis-ci.com/dai-shi/use-context-selector)\n[![npm version](https://badge.fury.io/js/use-context-selector.svg)](https://badge.fury.io/js/use-context-selector)\n[![bundle size](https://badgen.net/bundlephobia/minzip/use-context-selector)](https://bundlephobia.com/result?p=use-context-selector)\n\nReact useContext with selector support in userland\n\n## Introduction\n\nReact Context and useContext is often used to avoid prop drilling,\nhowever it's known that there's a performance issue.\nWhen a context value is changed, all components that useContext\nwill re-render.\n\nTo solve this issue,\n[useContextSelector](https://github.com/reactjs/rfcs/pull/119)\nis proposed and later proposed\n[Speculative Mode](https://github.com/reactjs/rfcs/pull/150)\nwith context selector support.\nThis library provides the API in userland.\n\nv1 uses `calculateChangedBits=()=>0` technique to stop propagation,\nwhile v2 uses `useMutableSource`.\n\n## Install\n\n```bash\nnpm install use-context-selector\n```\n\n## Usage\n\n```javascript\nimport React, { useState } from 'react';\nimport ReactDOM from 'react-dom';\n\nimport { createContext, useContextSelector } from 'use-context-selector';\n\nconst context = createContext(null);\n\nconst Counter1 = () => {\n  const count1 = useContextSelector(context, v => v[0].count1);\n  const setState = useContextSelector(context, v => v[1]);\n  const increment = () => setState(s => ({\n    ...s,\n    count1: s.count1 + 1,\n  }));\n  return (\n    <div>\n      <span>Count1: {count1}</span>\n      <button type=\"button\" onClick={increment}>+1</button>\n      {Math.random()}\n    </div>\n  );\n};\n\nconst Counter2 = () => {\n  const count2 = useContextSelector(context, v => v[0].count2);\n  const setState = useContextSelector(context, v => v[1]);\n  const increment = () => setState(s => ({\n    ...s,\n    count2: s.count2 + 1,\n  }));\n  return (\n    <div>\n      <span>Count2: {count2}</span>\n      <button type=\"button\" onClick={increment}>+1</button>\n      {Math.random()}\n    </div>\n  );\n};\n\nconst StateProvider = ({ children }) => {\n  const [state, setState] = useState({ count1: 0, count2: 0 });\n  return (\n    <context.Provider value={[state, setState]}>\n      {children}\n    </context.Provider>\n  );\n};\n\nconst App = () => (\n  <StateProvider>\n    <Counter1 />\n    <Counter2 />\n  </StateProvider>\n);\n\nReactDOM.render(<App />, document.getElementById('app'));\n```\n\n## Migrating from v1 to v2\n\nIn v1:\n\n```js\nuseContextSelector(context, state => state.count);\n```\n\nIn v2:\n\n```js\nuseContext(context, useCallback(state => state.count, []));\n```\n\nIn this case, you can (should) also define the selector function outside render.\n\n## API\n\n<!-- Generated by documentation.js. Update this documentation by updating the source code. -->\n\n### createContext\n\nThis creates a special context for selector-enabled `useContext`.\n\nIt doesn't pass its value but a ref of the value.\nUnlike the original context provider, this context provider\nexpects the context value to be immutable and stable.\n\n#### Parameters\n\n-   `defaultValue` **Value** \n\n#### Examples\n\n```javascript\nimport { createContext } from 'use-context-selector';\n\nconst PersonContext = createContext({ firstName: '', familyName: '' });\n```\n\n### useContext\n\nThis hook returns context value with optional selector.\n\nIt will only accept context created by `createContext`.\nIt will trigger re-render if only the selected value is referentially changed.\nThe selector must be stable.\nEither define selector outside render or wrap with `useCallback`.\n\nThe selector should return referentially equal result for same input for better performance.\n\n#### Parameters\n\n-   `context` **Context&lt;Value>** \n-   `selector` **function (value: Value): Selected**  (optional, default `identity as(value:Value)=>Selected`)\n\n#### Examples\n\n```javascript\nimport { useContext } from 'use-context-selector';\n\nconst firstName = useContext(PersonContext, state => state.firstName);\n```\n\n### wrapCallbackWithPriority\n\nA utility function to wrap a callback function with higher priority\n\nUse this for a callback that will change a value,\nwhich will be fed into context provider.\n\n#### Parameters\n\n-   `callback` **Callback** \n\n#### Examples\n\n```javascript\nimport { wrapCallbackWithPriority } from 'use-context-selector';\n\nconst wrappedCallback = wrapCallbackWithPriority(callback);\n```\n\n## Limitations\n\n-   In order to stop propagation, `children` of a context provider has to be either created outside of the provider or memoized with `React.memo`.\n-   Provider trigger re-renders only if the context value is referentially changed.\n-   Neither context consumers or class components are supported.\n-   The [stale props](https://react-redux.js.org/api/hooks#stale-props-and-zombie-children) issue isn't solved.\n-   Due to the current useMutableSource limitation, a selector can't return a function. (See `01_basic_spec` wrapping setState)\n-   Tearing is only avoided within the Provider tree. A value outside the Provider will tear. (`02_tearing_spec` fails)\n\n## Examples\n\nThe [examples](examples) folder contains working examples.\nYou can run one of them with\n\n```bash\nPORT=8080 npm run examples:01_minimal\n```\n\nand open <http://localhost:8080> in your web browser.\n\nYou can also try them in codesandbox.io:\n[01](https://codesandbox.io/s/github/dai-shi/use-context-selector/tree/master/examples/01_minimal)\n[02](https://codesandbox.io/s/github/dai-shi/use-context-selector/tree/master/examples/02_typescript)\n\n## Related projects\n\n-   [react-tracked](https://github.com/dai-shi/react-tracked)\n-   [reactive-react-redux](https://github.com/dai-shi/reactive-react-redux)\n","readmeFilename":"README.md","gitHead":"4da247842784c43d88b3cdbced2433b05d14dc4f","bugs":{"url":"https://github.com/dai-shi/use-context-selector/issues"},"homepage":"https://github.com/dai-shi/use-context-selector#readme","_id":"use-context-selector@2.0.0-alpha.3","_nodeVersion":"10.19.0","_npmVersion":"6.14.3","dist":{"integrity":"sha512-tziNN7jNEewNt3M1gkKfbMMsm+BJOl0rStIVrt4M/uHSIyiLVS4EkXtlp3OvOT+xzt2GjrE8pq5Vu7M9c7TOpw==","shasum":"9cfb75769b719b5dc6120192d358236d8c669b6c","tarball":"https://registry.npmjs.org/use-context-selector/-/use-context-selector-2.0.0-alpha.3.tgz","fileCount":12,"unpackedSize":40570,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeehCsCRA9TVsSAnZWagAA+lEP/0AFMwFriS3f7xRaNe15\n5hBfUsW+MzG39aRJlxdumjRa0Qm0+mx8B6qa9vE9Y7n5Kg+VeobGM0pC5T5F\nEqqBhh9Yl7iu1MbgMUHVG5jkJEiSODiUshN47Lgu4r7QoEpXo4i8GDEZ1jbV\n3GZ4wdZb/4lcQsEoTxei/L35mBapAgL9kNvfR8Tv2T9DFLOsnfXAD9JDZMNH\nFvBStULIUOI8UcfQbtEVAMXmZqwN75mneVmv6MqtG+TEqNzjiQ72FH7U0+lk\ncaLbGAjwGsGeRYSpRMFo6j5aL/0jMWT7F7+E6Izjqkc4XymOtfEsVe8WLKLG\nEfFQcCEMGcMbRz6ddwii7O2dSikEkZxhleJpMTWq0cTAUHd76KyejZl0/uEm\njVwp2a2pzClF2ehe110bKAnAvupapJ7OjIPIl/eN19lZ5tdorkt7YeZWb5ej\nHrR6JLmiNzp4YQ9IfLFtV/+N8ay5C1EF41AtqNlZi8kvd+wu0Wn+yWr3WA+E\nuRu2HSXI1ldAlVs8mQslD5Wp+6W3jCvEximLxnKLdQbED5oNPDJfsIog/RxG\nU2Y58AUZjUdyXAYUIWWYaNUWIRJw429oAaVGWYz7UoFC9it7jodhHxGbJwRp\nCXGv0FLGIWsW8XFO4qJZ4s6tIO018jfFWyfaUGo/CsxhC87sCbN+Z5JuJ+LW\nFuAH\r\n=yyHX\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIDNtgg8kq0wLvOEy3WOUezJ9H67QzAKecbgQlVD3BfAJAiAfjxxYT2BxDGiypnGzNOxarz2EjHhSBvEhM5mtPznrTQ=="}]},"maintainers":[{"name":"daishi","email":"daishi@axlight.com"}],"_npmUser":{"name":"daishi","email":"daishi@axlight.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/use-context-selector_2.0.0-alpha.3_1585057964371_0.30973645757459245"},"_hasShrinkwrap":false},"2.0.0-alpha.4":{"name":"use-context-selector","description":"React useContext with selector support in userland","version":"2.0.0-alpha.4","publishConfig":{"tag":"next"},"author":{"name":"Daishi Kato"},"repository":{"type":"git","url":"git+https://github.com/dai-shi/use-context-selector.git"},"source":"./src/index.ts","main":"./dist/index.js","module":"./dist/index.esm.js","browser":"./dist/index.umd.js","types":"./dist/src/index.d.ts","sideEffects":false,"scripts":{"compile":"microbundle build --format cjs,es,umd","test":"run-s eslint tsc-test jest","eslint":"eslint --ext .js,.ts,.tsx --ignore-pattern dist .","jest":"jest --preset ts-jest/presets/js-with-ts __tests__/*.tsx","tsc-test":"tsc --project . --noEmit","apidoc":"documentation readme --section API --markdown-toc false --parse-extension ts src/*.ts","examples:01_minimal":"DIR=01_minimal EXT=js webpack-dev-server","examples:02_typescript":"DIR=02_typescript webpack-dev-server"},"keywords":["react","context","hooks"],"license":"MIT","dependencies":{},"devDependencies":{"@testing-library/react":"^10.0.4","@types/jest":"^25.2.3","@types/react":"^16.9.35","@types/react-dom":"^16.9.8","@types/scheduler":"^0.16.1","@typescript-eslint/eslint-plugin":"^3.0.0","@typescript-eslint/parser":"^3.0.0","documentation":"^13.0.0","eslint":"^7.0.0","eslint-config-airbnb":"^18.1.0","eslint-plugin-import":"^2.20.2","eslint-plugin-jsx-a11y":"^6.2.3","eslint-plugin-react":"^7.20.0","eslint-plugin-react-hooks":"^4.0.2","html-webpack-plugin":"^4.3.0","jest":"^26.0.1","microbundle":"^0.12.0","npm-run-all":"^4.1.5","react":"experimental","react-dom":"experimental","scheduler":"experimental","ts-jest":"^26.0.0","ts-loader":"^7.0.4","typescript":"^3.9.3","webpack":"^4.43.0","webpack-cli":"^3.3.11","webpack-dev-server":"^3.11.0"},"peerDependencies":{"react":">=16.14.0","scheduler":">=0.20.0"},"readme":"# use-context-selector\n\n[![Build Status](https://travis-ci.com/dai-shi/use-context-selector.svg?branch=master)](https://travis-ci.com/dai-shi/use-context-selector)\n[![npm version](https://badge.fury.io/js/use-context-selector.svg)](https://badge.fury.io/js/use-context-selector)\n[![bundle size](https://badgen.net/bundlephobia/minzip/use-context-selector)](https://bundlephobia.com/result?p=use-context-selector)\n\nReact useContext with selector support in userland\n\n## Introduction\n\nReact Context and useContext is often used to avoid prop drilling,\nhowever it's known that there's a performance issue.\nWhen a context value is changed, all components that useContext\nwill re-render.\n\nTo solve this issue,\n[useContextSelector](https://github.com/reactjs/rfcs/pull/119)\nis proposed and later proposed\n[Speculative Mode](https://github.com/reactjs/rfcs/pull/150)\nwith context selector support.\nThis library provides the API in userland.\n\nv1 uses `calculateChangedBits=()=>0` technique to stop propagation,\nwhile v2 uses `useMutableSource`.\n\n## Install\n\n```bash\nnpm install use-context-selector\n```\n\n## Usage\n\n```javascript\nimport React, { useState } from 'react';\nimport ReactDOM from 'react-dom';\n\nimport { createContext, useContextSelector } from 'use-context-selector';\n\nconst context = createContext(null);\n\nconst Counter1 = () => {\n  const count1 = useContextSelector(context, v => v[0].count1);\n  const setState = useContextSelector(context, v => v[1]);\n  const increment = () => setState(s => ({\n    ...s,\n    count1: s.count1 + 1,\n  }));\n  return (\n    <div>\n      <span>Count1: {count1}</span>\n      <button type=\"button\" onClick={increment}>+1</button>\n      {Math.random()}\n    </div>\n  );\n};\n\nconst Counter2 = () => {\n  const count2 = useContextSelector(context, v => v[0].count2);\n  const setState = useContextSelector(context, v => v[1]);\n  const increment = () => setState(s => ({\n    ...s,\n    count2: s.count2 + 1,\n  }));\n  return (\n    <div>\n      <span>Count2: {count2}</span>\n      <button type=\"button\" onClick={increment}>+1</button>\n      {Math.random()}\n    </div>\n  );\n};\n\nconst StateProvider = ({ children }) => {\n  const [state, setState] = useState({ count1: 0, count2: 0 });\n  return (\n    <context.Provider value={[state, setState]}>\n      {children}\n    </context.Provider>\n  );\n};\n\nconst App = () => (\n  <StateProvider>\n    <Counter1 />\n    <Counter2 />\n  </StateProvider>\n);\n\nReactDOM.render(<App />, document.getElementById('app'));\n```\n\n## Migrating from v1 to v2\n\nIn v1:\n\n```js\nuseContextSelector(context, state => state.count);\n```\n\nIn v2:\n\n```js\nuseContext(context, useCallback(state => state.count, []));\n```\n\nIn this case, you can (should) also define the selector function outside render.\n\n## API\n\n<!-- Generated by documentation.js. Update this documentation by updating the source code. -->\n\n### createContext\n\nThis creates a special context for selector-enabled `useContext`.\n\nIt doesn't pass its value but a ref of the value.\nUnlike the original context provider, this context provider\nexpects the context value to be immutable and stable.\n\n#### Parameters\n\n-   `defaultValue` **Value** \n\n#### Examples\n\n```javascript\nimport { createContext } from 'use-context-selector';\n\nconst PersonContext = createContext({ firstName: '', familyName: '' });\n```\n\n### useContext\n\nThis hook returns context value with optional selector.\n\nIt will only accept context created by `createContext`.\nIt will trigger re-render if only the selected value is referentially changed.\nThe selector must be stable.\nEither define selector outside render or wrap with `useCallback`.\n\nThe selector should return referentially equal result for same input for better performance.\n\n#### Parameters\n\n-   `context` **Context&lt;Value>** \n-   `selector` **function (value: Value): Selected**  (optional, default `identity as(value:Value)=>Selected`)\n\n#### Examples\n\n```javascript\nimport { useContext } from 'use-context-selector';\n\nconst firstName = useContext(PersonContext, state => state.firstName);\n```\n\n### wrapCallbackWithPriority\n\nA utility function to wrap a callback function with higher priority\n\nUse this for a callback that will change a value,\nwhich will be fed into context provider.\n\n#### Parameters\n\n-   `callback` **Callback** \n\n#### Examples\n\n```javascript\nimport { wrapCallbackWithPriority } from 'use-context-selector';\n\nconst wrappedCallback = wrapCallbackWithPriority(callback);\n```\n\n## Limitations\n\n-   In order to stop propagation, `children` of a context provider has to be either created outside of the provider or memoized with `React.memo`.\n-   Provider trigger re-renders only if the context value is referentially changed.\n-   Neither context consumers or class components are supported.\n-   The [stale props](https://react-redux.js.org/api/hooks#stale-props-and-zombie-children) issue can't be solved in userland.\n-   Due to the current useMutableSource limitation, a selector can't return a function. (See `01_basic_spec` wrapping setState)\n-   Tearing is only avoided within the Provider tree. A value outside the Provider will tear. (`02_tearing_spec` fails)\n\n## Examples\n\nThe [examples](examples) folder contains working examples.\nYou can run one of them with\n\n```bash\nPORT=8080 npm run examples:01_minimal\n```\n\nand open <http://localhost:8080> in your web browser.\n\nYou can also try them in codesandbox.io:\n[01](https://codesandbox.io/s/github/dai-shi/use-context-selector/tree/master/examples/01_minimal)\n[02](https://codesandbox.io/s/github/dai-shi/use-context-selector/tree/master/examples/02_typescript)\n\n## Related projects\n\n-   [react-tracked](https://github.com/dai-shi/react-tracked)\n-   [reactive-react-redux](https://github.com/dai-shi/reactive-react-redux)\n","readmeFilename":"README.md","gitHead":"2dff03da9fe2b2c276b736ee18826bdf22e3d7f4","bugs":{"url":"https://github.com/dai-shi/use-context-selector/issues"},"homepage":"https://github.com/dai-shi/use-context-selector#readme","_id":"use-context-selector@2.0.0-alpha.4","_nodeVersion":"10.19.0","_npmVersion":"6.14.5","dist":{"integrity":"sha512-u0i3lLsi7HfZV5ovSONwDmltIQCLjsxnSGStMIuyT3xH9P1aSp6+Cko/Gsu1vmBjqpTGNeQm2sI7PGjZc/krXA==","shasum":"6d48d7fd45ea57b585acf56708b929441d01c1b2","tarball":"https://registry.npmjs.org/use-context-selector/-/use-context-selector-2.0.0-alpha.4.tgz","fileCount":12,"unpackedSize":44621,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe06bhCRA9TVsSAnZWagAAO2UQAJxsVXIFQvtvjJaZK8mI\nDL7txfuvj2yh1sGgMEJgvGzSwBtYokei6wIWW4hDRAshZoVzYrhv117JCIe8\n1SNJMjSBxKX+7we7R6NZMV8hCC9+WKESKNuSa7GxD4UWFTY7HwNWw5b4IxJo\nc1mFuSHANLMCNgLzukRgRcvT3lWfgNSo34nFoCLslleJD4bQLlsFLbg7wX+N\nFTUPSslFinV99++pZRhww2xX9Rly1DiMPeTL/f5wek3OrMfjfBKzi+GRcfvJ\nIw0Csy2UpayUNG5OOWjv7Q5WKNdrLKujUTD4m7RW2c8sCucYW9T2lHi/2zCl\nZGJa+RwXUf5ex5ViMKXF6/XFn08tdhPLLTUoLhT9YUHLsmleF55l9iSIdMv4\ngQylTVepzUQbRuGTYOHcOkNvhFC9nAtAl8192gV10yVxQfosuYnnVdePG9Wb\nj4QD9ey1El0FW4/3Ku3R8543Nj+MKhFyOO5R2H+r//g6wTLV82qYQlb78ljg\nf/n5K7FypQwU07esZwtah6pec8tWm786pJI7SN60xdNiDeuzozIlCck47+MY\nsLN2vwE8Z7ZqN0sijsX03jZJMQA9aFgX+Q3bfhH0NeTVB1k8SCaF8FIMAF+G\nOqgkVL62du9Xbx4IrQ4Uze47lL3hi+cS9FprYQbuHHGoKTmc/7WDSeFYxivW\nhj5e\r\n=8Y0l\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDwsXAzhuFiqkAJ9uVJOLl58rDKwYfIYFk4n/XPybrcyQIgMTLs08E53Rjad/+OkC+mrBCweyFbzJ5sjmLuVOkB9xQ="}]},"maintainers":[{"name":"daishi","email":"daishi@axlight.com"}],"_npmUser":{"name":"daishi","email":"daishi@axlight.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/use-context-selector_2.0.0-alpha.4_1590929120673_0.9760656970577173"},"_hasShrinkwrap":false},"1.1.2":{"name":"use-context-selector","description":"React useContextSelector hook in userland","version":"1.1.2","author":{"name":"Daishi Kato"},"repository":{"type":"git","url":"git+https://github.com/dai-shi/use-context-selector.git"},"source":"./src/index.js","main":"./dist/index.umd.js","module":"./dist/index.modern.js","types":"./src/index.d.ts","sideEffects":false,"scripts":{"compile":"microbundle build -f modern,umd","test":"run-s eslint tsc-test jest","eslint":"eslint --ext .js,.ts,.tsx --ignore-pattern dist .","jest":"jest","tsc-test":"tsc --project . --noEmit","apidoc":"documentation readme --section API --markdown-toc false src/index.js","examples:01_minimal":"DIR=01_minimal EXT=js webpack-dev-server","examples:02_typescript":"DIR=02_typescript webpack-dev-server"},"keywords":["react","context","hooks"],"license":"MIT","dependencies":{},"devDependencies":{"@babel/cli":"^7.10.4","@babel/core":"^7.10.4","@babel/preset-env":"^7.10.4","@babel/preset-react":"^7.10.4","@testing-library/react":"^10.4.3","@types/react":"^16.9.41","@types/react-dom":"^16.9.8","@typescript-eslint/eslint-plugin":"^3.5.0","@typescript-eslint/parser":"^3.5.0","babel-loader":"^8.1.0","documentation":"^13.0.2","eslint":"^7.3.1","eslint-config-airbnb":"^18.2.0","eslint-plugin-import":"^2.22.0","eslint-plugin-jsx-a11y":"^6.3.1","eslint-plugin-react":"^7.20.3","eslint-plugin-react-hooks":"^4.0.5","html-webpack-plugin":"^4.3.0","jest":"^26.1.0","microbundle":"^0.12.2","npm-run-all":"^4.1.5","react":"experimental","react-dom":"experimental","ts-loader":"^7.0.5","typescript":"^3.9.6","webpack":"^4.43.0","webpack-cli":"^3.3.12","webpack-dev-server":"^3.11.0"},"peerDependencies":{"react":">=16.8.0"},"babel":{"presets":[["@babel/preset-env",{"targets":"> 0.2%, not dead"}],"@babel/preset-react"]},"gitHead":"5a07f62a65ad13665fd95230c30eac8aba904c7e","bugs":{"url":"https://github.com/dai-shi/use-context-selector/issues"},"homepage":"https://github.com/dai-shi/use-context-selector#readme","_id":"use-context-selector@1.1.2","_nodeVersion":"12.18.1","_npmVersion":"6.14.5","dist":{"integrity":"sha512-uwtrMKEHjZQ8JXMZLUljVDY4CqpAC3MgMcmtpZACG+pJeJ7GNDzBW0thC2RbJX2wKYMvLtYRXgQEqaOnmlF/KQ==","shasum":"63bf6e3502fd383f1257c49df2495e05564d262e","tarball":"https://registry.npmjs.org/use-context-selector/-/use-context-selector-1.1.2.tgz","fileCount":10,"unpackedSize":25198,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe/aWXCRA9TVsSAnZWagAAneMP+gMOzqWZmGDYlZkqkAZ2\nqOT7RnYtu3CiEr49wInicA8vTiodqU1Aqx7j2Tb5eMQbCGmH+6LRbkbmBlzc\nPVa8r0FcHyjq2i4mNHgcLJ98bxT1vyUz40dcB9CIObOp5QmqT3RSngNqKmQ1\nQf704rxF1RkqEJHXQ68BJPKuSUHyUim7ztE5q7fUz/8G438dvNWAJ5stbLE4\n5Q6MAyNjBZALFhzkZWbOfjukSlGsjRlZsW8ybsAIYWYUDnYcb5hy2CDKLEAU\nJovl7YGOxef4U6yV6WianebmNABLLhVlMv8XMLefXQazOazKgFkn7MTUcopS\nMjHesqxV1Uf+iA9HLZWgJ6hVsTWfjkk87adDSdYQ50ui78w2ap8k8801oCUn\nKP/zIL9vzOYHBQUiQ0mDoWrco8mQit0KIERuR5n7Ft8oPE3cCg/EftSTgF1S\nneSD7iL6u03oIgw5cGlSw33VQ85UoiIwoRtHQZxFnUQJBAWvgnKCTxUKNVnu\n5Al1TQS1ue6FXGFDODjccgmShq9rppc1n6yPsSuqHnyykLqZ/A28XEpoQahJ\n2y3XQMpZWOopS4O+dlI8JLWLUTlKrsrJU3xzpQSP47Lmf+R1iz5gmjKwd1Z7\nltsrEYTA4INHz5VO9P4EY/2WSQMv9x7IQqRRlLOvAQ1VsB/LvRIsOWvHmtU9\nvYdQ\r\n=Z6yp\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIACgugfpvJ6lZJj8EGnJRd2o9kOcNV3s7k7ulpPM6sajAiALWcqoTSXZGehCsvfGAq6i8KSoHQlcvWky+DyQ8Z3LQw=="}]},"maintainers":[{"name":"daishi","email":"daishi@axlight.com"}],"_npmUser":{"name":"daishi","email":"daishi@axlight.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/use-context-selector_1.1.2_1593681303414_0.28524535930030037"},"_hasShrinkwrap":false},"2.0.0-alpha.5":{"name":"use-context-selector","description":"React useContext with selector support in userland","version":"2.0.0-alpha.5","publishConfig":{"tag":"next"},"author":{"name":"Daishi Kato"},"repository":{"type":"git","url":"git+https://github.com/dai-shi/use-context-selector.git"},"source":"./src/index.ts","main":"./dist/index.umd.js","module":"./dist/index.modern.js","types":"./dist/src/index.d.ts","sideEffects":false,"scripts":{"compile":"microbundle build -f modern,umd","test":"run-s eslint tsc-test jest","eslint":"eslint --ext .js,.ts,.tsx --ignore-pattern dist .","jest":"jest --preset ts-jest/presets/js-with-ts __tests__/*.tsx","tsc-test":"tsc --project . --noEmit","apidoc":"documentation readme --section API --markdown-toc false --parse-extension ts src/*.ts","examples:01_minimal":"DIR=01_minimal EXT=js webpack-dev-server","examples:02_typescript":"DIR=02_typescript webpack-dev-server"},"keywords":["react","context","hooks"],"license":"MIT","dependencies":{},"devDependencies":{"@testing-library/react":"^10.4.3","@types/jest":"^26.0.3","@types/react":"^16.9.41","@types/react-dom":"^16.9.8","@types/scheduler":"^0.16.1","@typescript-eslint/eslint-plugin":"^3.5.0","@typescript-eslint/parser":"^3.5.0","documentation":"^13.0.2","eslint":"^7.3.1","eslint-config-airbnb":"^18.2.0","eslint-plugin-import":"^2.22.0","eslint-plugin-jsx-a11y":"^6.3.1","eslint-plugin-react":"^7.20.3","eslint-plugin-react-hooks":"^4.0.5","html-webpack-plugin":"^4.3.0","jest":"^26.1.0","microbundle":"^0.12.2","npm-run-all":"^4.1.5","react":"experimental","react-dom":"experimental","scheduler":"experimental","ts-jest":"^26.1.1","ts-loader":"^7.0.5","typescript":"^3.9.6","webpack":"^4.43.0","webpack-cli":"^3.3.12","webpack-dev-server":"^3.11.0"},"peerDependencies":{"react":">=16.14.0","scheduler":">=0.20.0"},"gitHead":"b571171a503678887c74d50a988eb64009f9ad77","readme":"# use-context-selector\n\n[![CI](https://img.shields.io/github/workflow/status/dai-shi/use-context-selector/CI)](https://github.com/dai-shi/use-context-selector/actions?query=workflow%3ACI)\n[![npm](https://img.shields.io/npm/v/use-context-selector)](https://www.npmjs.com/package/use-context-selector)\n[![size](https://img.shields.io/bundlephobia/minzip/use-context-selector)](https://bundlephobia.com/result?p=use-context-selector)\n\nReact useContext with selector support in userland\n\n## Introduction\n\nReact Context and useContext is often used to avoid prop drilling,\nhowever it's known that there's a performance issue.\nWhen a context value is changed, all components that useContext\nwill re-render.\n\nTo solve this issue,\n[useContextSelector](https://github.com/reactjs/rfcs/pull/119)\nis proposed and later proposed\n[Speculative Mode](https://github.com/reactjs/rfcs/pull/150)\nwith context selector support.\nThis library provides the API in userland.\n\nv1 uses `calculateChangedBits=()=>0` technique to stop propagation,\nwhile v2 uses `useMutableSource`.\n\n## Install\n\n```bash\nnpm install use-context-selector\n```\n\n## Usage\n\n```javascript\nimport React, { useState } from 'react';\nimport ReactDOM from 'react-dom';\n\nimport { createContext, useContextSelector } from 'use-context-selector';\n\nconst context = createContext(null);\n\nconst Counter1 = () => {\n  const count1 = useContextSelector(context, v => v[0].count1);\n  const setState = useContextSelector(context, v => v[1]);\n  const increment = () => setState(s => ({\n    ...s,\n    count1: s.count1 + 1,\n  }));\n  return (\n    <div>\n      <span>Count1: {count1}</span>\n      <button type=\"button\" onClick={increment}>+1</button>\n      {Math.random()}\n    </div>\n  );\n};\n\nconst Counter2 = () => {\n  const count2 = useContextSelector(context, v => v[0].count2);\n  const setState = useContextSelector(context, v => v[1]);\n  const increment = () => setState(s => ({\n    ...s,\n    count2: s.count2 + 1,\n  }));\n  return (\n    <div>\n      <span>Count2: {count2}</span>\n      <button type=\"button\" onClick={increment}>+1</button>\n      {Math.random()}\n    </div>\n  );\n};\n\nconst StateProvider = ({ children }) => {\n  const [state, setState] = useState({ count1: 0, count2: 0 });\n  return (\n    <context.Provider value={[state, setState]}>\n      {children}\n    </context.Provider>\n  );\n};\n\nconst App = () => (\n  <StateProvider>\n    <Counter1 />\n    <Counter2 />\n  </StateProvider>\n);\n\nReactDOM.render(<App />, document.getElementById('app'));\n```\n\n## Migrating from v1 to v2\n\nIn v1:\n\n```js\nuseContextSelector(context, state => state.count);\n```\n\nIn v2:\n\n```js\nuseContext(context, useCallback(state => state.count, []));\n```\n\nIn this case, you can (should) also define the selector function outside render.\n\n## API\n\n<!-- Generated by documentation.js. Update this documentation by updating the source code. -->\n\n### createContext\n\nThis creates a special context for selector-enabled `useContext`.\n\nIt doesn't pass its value but a ref of the value.\nUnlike the original context provider, this context provider\nexpects the context value to be immutable and stable.\n\n#### Parameters\n\n-   `defaultValue` **Value** \n\n#### Examples\n\n```javascript\nimport { createContext } from 'use-context-selector';\n\nconst PersonContext = createContext({ firstName: '', familyName: '' });\n```\n\n### useContext\n\nThis hook returns context value with optional selector.\n\nIt will only accept context created by `createContext`.\nIt will trigger re-render if only the selected value is referentially changed.\nThe selector must be stable.\nEither define selector outside render or wrap with `useCallback`.\n\nThe selector should return referentially equal result for same input for better performance.\n\n#### Parameters\n\n-   `context` **Context&lt;Value>** \n-   `selector` **function (value: Value): Selected**  (optional, default `identity as(value:Value)=>Selected`)\n\n#### Examples\n\n```javascript\nimport { useContext } from 'use-context-selector';\n\nconst firstName = useContext(PersonContext, state => state.firstName);\n```\n\n### wrapCallbackWithPriority\n\nA utility function to wrap a callback function with higher priority\n\nUse this for a callback that will change a value,\nwhich will be fed into context provider.\n\n#### Parameters\n\n-   `callback` **Callback** \n\n#### Examples\n\n```javascript\nimport { wrapCallbackWithPriority } from 'use-context-selector';\n\nconst wrappedCallback = wrapCallbackWithPriority(callback);\n```\n\n## Limitations\n\n-   In order to stop propagation, `children` of a context provider has to be either created outside of the provider or memoized with `React.memo`.\n-   Provider trigger re-renders only if the context value is referentially changed.\n-   Neither context consumers or class components are supported.\n-   The [stale props](https://react-redux.js.org/api/hooks#stale-props-and-zombie-children) issue can't be solved in userland.\n-   Tearing is only avoided within the Provider tree. A value outside the Provider will tear. (`02_tearing_spec` fails)\n\n## Examples\n\nThe [examples](examples) folder contains working examples.\nYou can run one of them with\n\n```bash\nPORT=8080 npm run examples:01_minimal\n```\n\nand open <http://localhost:8080> in your web browser.\n\nYou can also try them in codesandbox.io:\n[01](https://codesandbox.io/s/github/dai-shi/use-context-selector/tree/master/examples/01_minimal)\n[02](https://codesandbox.io/s/github/dai-shi/use-context-selector/tree/master/examples/02_typescript)\n\n## Related projects\n\n-   [react-tracked](https://github.com/dai-shi/react-tracked)\n-   [reactive-react-redux](https://github.com/dai-shi/reactive-react-redux)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/dai-shi/use-context-selector/issues"},"homepage":"https://github.com/dai-shi/use-context-selector#readme","_id":"use-context-selector@2.0.0-alpha.5","_nodeVersion":"12.18.1","_npmVersion":"6.14.5","dist":{"integrity":"sha512-fEnhlNYRXpIJpHky36seMmZrtrZGjSFHJHFKg1GPbHyRqj1zqQ5ajkYwis+CyxqMZIMOFyBIotjxCAHBt/HvaQ==","shasum":"f58ff31b1d3bedca8fae30574e36538f7bffb121","tarball":"https://registry.npmjs.org/use-context-selector/-/use-context-selector-2.0.0-alpha.5.tgz","fileCount":10,"unpackedSize":35156,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe/arbCRA9TVsSAnZWagAArwcP/1rwQYkuMYRT7OYdcHdt\na/Rn0R7Wmlu1IMEYwkbi1O+ohA5VU+4f8kDJ20fiiFD2hf4DzFWg8w0Z9rRm\n8fJxQ8WxPadsTKo5cKZTdgr2TrjJgHRDsrRuL5LvPiuSwS9dXy+sDuUCGvEm\nlOJebyPifIqhxOW9M8fCHajLL1Bs0BnOAMtnBJppQep98dgKUVu177HXvJPe\n3Yx07UTBNYWIhYKZDZKKTyqyXkAZhTkeCbPxPpQF5zhjGgATZjsHVdpc/2jZ\nRkCIc50aYM4488/LFxmRqVxNB+903xrWMQRnmGb/YibsFJ+67AR3B/FQauAt\nbcnSuG7na8wJDXPv8BlYMGT6M6Plwd1m1T13w6QOitz9dSFILk2pUIsjvhsN\n48JivRNL6M76g3Yz/W7/bM7j228ifCmqH4zDi31C4IVmQu2ZKJd2aUYRJ9cS\nu9nQUvsY/eef3/2qibgu5ZepmCxCR/0rRAUycgJJUUhVYgexzfWRfMcvepin\ntopygfbM5lq8R4w65ubPa+NUG6n+eovyOh9fJqaLFjBNf4QJsKJUhyAOd+TP\nr5au6yHy1e8eGhY6oaXnX2Tnw0Bfzkoco6N91cw7cPQ8zuC+YPZs9rFmpGs9\nh/FXVlubgSkyyjcXqbd3dagpzKd1hL03kJvZ6+X/UPpJzZOqrHAMW1NpfvGk\nHe6m\r\n=Jgba\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDQ6c+Z5HubtckGIFpjerPKNPEJqou7jegue+MZp1JXzwIhANy4BgFatQHVCAtSeUqU8X5ctn72ENrHskyKk5apcxiN"}]},"maintainers":[{"name":"daishi","email":"daishi@axlight.com"}],"_npmUser":{"name":"daishi","email":"daishi@axlight.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/use-context-selector_2.0.0-alpha.5_1593682651280_0.654038363907899"},"_hasShrinkwrap":false},"2.0.0-alpha.6":{"name":"use-context-selector","description":"React useContext with selector support in userland","version":"2.0.0-alpha.6","publishConfig":{"tag":"next"},"author":{"name":"Daishi Kato"},"repository":{"type":"git","url":"git+https://github.com/dai-shi/use-context-selector.git"},"source":"./src/index.ts","main":"./dist/index.umd.js","module":"./dist/index.modern.js","types":"./dist/src/index.d.ts","sideEffects":false,"scripts":{"compile":"microbundle build -f modern,umd","test":"run-s eslint tsc-test jest","eslint":"eslint --ext .js,.ts,.tsx --ignore-pattern dist .","jest":"jest --preset ts-jest/presets/js-with-ts __tests__/*.tsx","tsc-test":"tsc --project . --noEmit","apidoc":"documentation readme --section API --markdown-toc false --parse-extension ts src/*.ts","examples:01_minimal":"DIR=01_minimal EXT=js webpack-dev-server","examples:02_typescript":"DIR=02_typescript webpack-dev-server"},"keywords":["react","context","hooks"],"license":"MIT","dependencies":{},"devDependencies":{"@testing-library/react":"^10.4.7","@types/jest":"^26.0.8","@types/react":"^16.9.44","@types/react-dom":"^16.9.8","@types/scheduler":"^0.16.1","@typescript-eslint/eslint-plugin":"^3.7.1","@typescript-eslint/parser":"^3.7.1","documentation":"^13.0.2","eslint":"^7.6.0","eslint-config-airbnb":"^18.2.0","eslint-plugin-import":"^2.22.0","eslint-plugin-jsx-a11y":"^6.3.1","eslint-plugin-react":"^7.20.5","eslint-plugin-react-hooks":"^4.0.8","html-webpack-plugin":"^4.3.0","jest":"^26.2.2","microbundle":"^0.12.3","npm-run-all":"^4.1.5","react":"experimental","react-dom":"experimental","scheduler":"experimental","ts-jest":"^26.1.4","ts-loader":"^8.0.2","typescript":"^3.9.7","webpack":"^4.44.1","webpack-cli":"^3.3.12","webpack-dev-server":"^3.11.0"},"peerDependencies":{"react":">=16.14.0","scheduler":">=0.20.0"},"gitHead":"ce4ae3491be07ecffb83967990fbdb6bd4daabed","readme":"# use-context-selector\n\n[![CI](https://img.shields.io/github/workflow/status/dai-shi/use-context-selector/CI)](https://github.com/dai-shi/use-context-selector/actions?query=workflow%3ACI)\n[![npm](https://img.shields.io/npm/v/use-context-selector)](https://www.npmjs.com/package/use-context-selector)\n[![size](https://img.shields.io/bundlephobia/minzip/use-context-selector)](https://bundlephobia.com/result?p=use-context-selector)\n\nReact useContext with selector support in userland\n\n## Introduction\n\nReact Context and useContext is often used to avoid prop drilling,\nhowever it's known that there's a performance issue.\nWhen a context value is changed, all components that useContext\nwill re-render.\n\nTo solve this issue,\n[useContextSelector](https://github.com/reactjs/rfcs/pull/119)\nis proposed and later proposed\n[Speculative Mode](https://github.com/reactjs/rfcs/pull/150)\nwith context selector support.\nThis library provides the API in userland.\n\nv1 uses `calculateChangedBits=()=>0` technique to stop propagation,\nwhile v2 uses `useMutableSource`.\n\n## Install\n\n```bash\nnpm install use-context-selector\n```\n\n## Usage\n\n```javascript\nimport React, { useState } from 'react';\nimport ReactDOM from 'react-dom';\n\nimport { createContext, useContextSelector } from 'use-context-selector';\n\nconst context = createContext(null);\n\nconst Counter1 = () => {\n  const count1 = useContextSelector(context, v => v[0].count1);\n  const setState = useContextSelector(context, v => v[1]);\n  const increment = () => setState(s => ({\n    ...s,\n    count1: s.count1 + 1,\n  }));\n  return (\n    <div>\n      <span>Count1: {count1}</span>\n      <button type=\"button\" onClick={increment}>+1</button>\n      {Math.random()}\n    </div>\n  );\n};\n\nconst Counter2 = () => {\n  const count2 = useContextSelector(context, v => v[0].count2);\n  const setState = useContextSelector(context, v => v[1]);\n  const increment = () => setState(s => ({\n    ...s,\n    count2: s.count2 + 1,\n  }));\n  return (\n    <div>\n      <span>Count2: {count2}</span>\n      <button type=\"button\" onClick={increment}>+1</button>\n      {Math.random()}\n    </div>\n  );\n};\n\nconst StateProvider = ({ children }) => {\n  const [state, setState] = useState({ count1: 0, count2: 0 });\n  return (\n    <context.Provider value={[state, setState]}>\n      {children}\n    </context.Provider>\n  );\n};\n\nconst App = () => (\n  <StateProvider>\n    <Counter1 />\n    <Counter2 />\n  </StateProvider>\n);\n\nReactDOM.render(<App />, document.getElementById('app'));\n```\n\n## Migrating from v1 to v2\n\nIn v1:\n\n```js\nuseContextSelector(context, state => state.count);\n```\n\nIn v2:\n\n```js\nuseContext(context, useCallback(state => state.count, []));\n```\n\nIn this case, you can (should) also define the selector function outside render.\n\n## API\n\n<!-- Generated by documentation.js. Update this documentation by updating the source code. -->\n\n### createContext\n\nThis creates a special context for selector-enabled `useContext`.\n\nIt doesn't pass its value but a ref of the value.\nUnlike the original context provider, this context provider\nexpects the context value to be immutable and stable.\n\n#### Parameters\n\n-   `defaultValue` **Value** \n\n#### Examples\n\n```javascript\nimport { createContext } from 'use-context-selector';\n\nconst PersonContext = createContext({ firstName: '', familyName: '' });\n```\n\n### useContext\n\nThis hook returns context value with optional selector.\n\nIt will only accept context created by `createContext`.\nIt will trigger re-render if only the selected value is referentially changed.\nThe selector must be stable.\nEither define selector outside render or wrap with `useCallback`.\n\nThe selector should return referentially equal result for same input for better performance.\n\n#### Parameters\n\n-   `context` **Context&lt;Value>** \n-   `selector` **function (value: Value): Selected**  (optional, default `identity as(value:Value)=>Selected`)\n\n#### Examples\n\n```javascript\nimport { useContext } from 'use-context-selector';\n\nconst firstName = useContext(PersonContext, state => state.firstName);\n```\n\n### wrapCallbackWithPriority\n\nA utility function to wrap a callback function with higher priority\n\nUse this for a callback that will change a value,\nwhich will be fed into context provider.\n\n#### Parameters\n\n-   `callback` **Callback** \n\n#### Examples\n\n```javascript\nimport { wrapCallbackWithPriority } from 'use-context-selector';\n\nconst wrappedCallback = wrapCallbackWithPriority(callback);\n```\n\n## Limitations\n\n-   In order to stop propagation, `children` of a context provider has to be either created outside of the provider or memoized with `React.memo`.\n-   Provider trigger re-renders only if the context value is referentially changed.\n-   Neither context consumers or class components are supported.\n-   The [stale props](https://react-redux.js.org/api/hooks#stale-props-and-zombie-children) issue can't be solved in userland.\n-   Tearing is only avoided within the Provider tree. A value outside the Provider will tear. (`02_tearing_spec` fails)\n\n## Examples\n\nThe [examples](examples) folder contains working examples.\nYou can run one of them with\n\n```bash\nPORT=8080 npm run examples:01_minimal\n```\n\nand open <http://localhost:8080> in your web browser.\n\nYou can also try them in codesandbox.io:\n[01](https://codesandbox.io/s/github/dai-shi/use-context-selector/tree/master/examples/01_minimal)\n[02](https://codesandbox.io/s/github/dai-shi/use-context-selector/tree/master/examples/02_typescript)\n\n## Related projects\n\n-   [react-tracked](https://github.com/dai-shi/react-tracked)\n-   [reactive-react-redux](https://github.com/dai-shi/reactive-react-redux)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/dai-shi/use-context-selector/issues"},"homepage":"https://github.com/dai-shi/use-context-selector#readme","_id":"use-context-selector@2.0.0-alpha.6","_nodeVersion":"12.18.3","_npmVersion":"6.14.6","dist":{"integrity":"sha512-N/sfGhc/IlRTG4wut1eBNkQ1h/N4VVgdEOVT68lEbljL5Tl6GoKD7EYQcitvVQOV1wFNFRr6Bp81IGv8OqQmqA==","shasum":"6ea98cece9b9fc487faca3d482bb443554442d63","tarball":"https://registry.npmjs.org/use-context-selector/-/use-context-selector-2.0.0-alpha.6.tgz","fileCount":10,"unpackedSize":35384,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfKCT9CRA9TVsSAnZWagAA3YEP/A3H3eVRgWk5Ocg9I16a\nFXa8sXuCYfr81j6WZkRpW88qsA45LCrJ8oIHQJVkOvu27NGH2Y4x7fn1G82E\nAev3IqlVI4sx/HNN5GdvSUVCTa7N3VBAPuZ+ExZFJEWc/6qxYg8PoE7rP5fb\n8o82cHAYUfD9eitAAoVNPIyWzVowLU+gdUUqEnJfBC50WuFvKrg/8ZQrmEVM\n6EGv72TFcuTmSdkCXlSH1lWmzeDfYkmel6LFsP45RvbSqCh3SL6KjgreBOnD\n3kcFt9a98x1i7NrxYMTY66fdGm36Ppdtw6BreHMkdCi5LOChHjk69WCAtW7j\nP7xWP9h8ZZKCrHgYm/7OHcgybHsibe8CyNWIeVcPgWOJiR6Cmf1/n883yQ6C\nARYggOK3JtzS0uRV3oGztEOKPg+NLz8BLBEwl40Sq6ftazZUQkpI7itDzZJr\nGARMjO+cHIpd4bsn6aiX62u/yfWBSiI9kX6OyFuZ8uxzc/ZrGWbdAC17g5y5\nV7t3rWP5xJEpv3OzeNE87vgi0lefPd5XXjir4luDwecSFev1PyF96TawbJHT\nVXaKwwd3enIF6vArLGTRjNqqcJlnuANoixZgKKjwjLvHP8Jp1CMvEqE2zOjm\nFwXF3wdKJB/QEt7ReyV8hwQOB9cQAubjFwhb3zPnHfL8aVHMmw8qqk87jb+/\nOIIW\r\n=v4Nv\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDzuro7UbfgOvIc4NJ+ZuOEkKRO0Vk5zq1TVKjlVEqjRQIhAOoerVqBaKBOD3fn9Ual/nZIvGoN3h4pz0GNnCM0pVKq"}]},"maintainers":[{"name":"daishi","email":"daishi@axlight.com"}],"_npmUser":{"name":"daishi","email":"daishi@axlight.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/use-context-selector_2.0.0-alpha.6_1596466428648_0.03464078748133259"},"_hasShrinkwrap":false},"2.0.0-alpha.7":{"name":"use-context-selector","description":"React useContext with selector support in userland","version":"2.0.0-alpha.7","publishConfig":{"tag":"next"},"author":{"name":"Daishi Kato"},"repository":{"type":"git","url":"git+https://github.com/dai-shi/use-context-selector.git"},"source":"./src/index.ts","main":"./dist/index.umd.js","module":"./dist/index.modern.js","types":"./dist/src/index.d.ts","sideEffects":false,"scripts":{"compile":"microbundle build -f modern,umd","test":"run-s eslint tsc-test jest","eslint":"eslint --ext .js,.ts,.tsx --ignore-pattern dist .","jest":"jest --preset ts-jest/presets/js-with-ts __tests__/*.tsx","tsc-test":"tsc --project . --noEmit","apidoc":"documentation readme --section API --markdown-toc false --parse-extension ts src/*.ts","examples:01_minimal":"DIR=01_minimal EXT=js webpack-dev-server","examples:02_typescript":"DIR=02_typescript webpack-dev-server"},"keywords":["react","context","hooks"],"license":"MIT","dependencies":{},"devDependencies":{"@testing-library/react":"^10.4.7","@types/jest":"^26.0.8","@types/react":"^16.9.44","@types/react-dom":"^16.9.8","@types/scheduler":"^0.16.1","@typescript-eslint/eslint-plugin":"^3.7.1","@typescript-eslint/parser":"^3.7.1","documentation":"^13.0.2","eslint":"^7.6.0","eslint-config-airbnb":"^18.2.0","eslint-plugin-import":"^2.22.0","eslint-plugin-jsx-a11y":"^6.3.1","eslint-plugin-react":"^7.20.5","eslint-plugin-react-hooks":"^4.0.8","html-webpack-plugin":"^4.3.0","jest":"^26.2.2","microbundle":"^0.12.3","npm-run-all":"^4.1.5","react":"experimental","react-dom":"experimental","scheduler":"experimental","ts-jest":"^26.1.4","ts-loader":"^8.0.2","typescript":"^3.9.7","webpack":"^4.44.1","webpack-cli":"^3.3.12","webpack-dev-server":"^3.11.0"},"peerDependencies":{"react":">=16.14.0","scheduler":">=0.20.0"},"gitHead":"feba3aabe8631fa70cfa3ec280c4f9843e86135b","readme":"# use-context-selector\n\n[![CI](https://img.shields.io/github/workflow/status/dai-shi/use-context-selector/CI)](https://github.com/dai-shi/use-context-selector/actions?query=workflow%3ACI)\n[![npm](https://img.shields.io/npm/v/use-context-selector)](https://www.npmjs.com/package/use-context-selector)\n[![size](https://img.shields.io/bundlephobia/minzip/use-context-selector)](https://bundlephobia.com/result?p=use-context-selector)\n\nReact useContext with selector support in userland\n\n## Introduction\n\nReact Context and useContext is often used to avoid prop drilling,\nhowever it's known that there's a performance issue.\nWhen a context value is changed, all components that useContext\nwill re-render.\n\nTo solve this issue,\n[useContextSelector](https://github.com/reactjs/rfcs/pull/119)\nis proposed and later proposed\n[Speculative Mode](https://github.com/reactjs/rfcs/pull/150)\nwith context selector support.\nThis library provides the API in userland.\n\nv1 uses `calculateChangedBits=()=>0` technique to stop propagation,\nwhile v2 uses `useMutableSource`.\n\n## Install\n\n```bash\nnpm install use-context-selector\n```\n\n## Usage\n\n```javascript\nimport React, { useState } from 'react';\nimport ReactDOM from 'react-dom';\n\nimport { createContext, useContextSelector } from 'use-context-selector';\n\nconst context = createContext(null);\n\nconst Counter1 = () => {\n  const count1 = useContextSelector(context, v => v[0].count1);\n  const setState = useContextSelector(context, v => v[1]);\n  const increment = () => setState(s => ({\n    ...s,\n    count1: s.count1 + 1,\n  }));\n  return (\n    <div>\n      <span>Count1: {count1}</span>\n      <button type=\"button\" onClick={increment}>+1</button>\n      {Math.random()}\n    </div>\n  );\n};\n\nconst Counter2 = () => {\n  const count2 = useContextSelector(context, v => v[0].count2);\n  const setState = useContextSelector(context, v => v[1]);\n  const increment = () => setState(s => ({\n    ...s,\n    count2: s.count2 + 1,\n  }));\n  return (\n    <div>\n      <span>Count2: {count2}</span>\n      <button type=\"button\" onClick={increment}>+1</button>\n      {Math.random()}\n    </div>\n  );\n};\n\nconst StateProvider = ({ children }) => {\n  const [state, setState] = useState({ count1: 0, count2: 0 });\n  return (\n    <context.Provider value={[state, setState]}>\n      {children}\n    </context.Provider>\n  );\n};\n\nconst App = () => (\n  <StateProvider>\n    <Counter1 />\n    <Counter2 />\n  </StateProvider>\n);\n\nReactDOM.render(<App />, document.getElementById('app'));\n```\n\n## Migrating from v1 to v2\n\nIn v1:\n\n```js\nuseContextSelector(context, state => state.count);\n```\n\nIn v2:\n\n```js\nuseContext(context, useCallback(state => state.count, []));\n```\n\nIn this case, you can (should) also define the selector function outside render.\n\n## API\n\n<!-- Generated by documentation.js. Update this documentation by updating the source code. -->\n\n### createContext\n\nThis creates a special context for selector-enabled `useContext`.\n\nIt doesn't pass its value but a ref of the value.\nUnlike the original context provider, this context provider\nexpects the context value to be immutable and stable.\n\n#### Parameters\n\n-   `defaultValue` **Value** \n\n#### Examples\n\n```javascript\nimport { createContext } from 'use-context-selector';\n\nconst PersonContext = createContext({ firstName: '', familyName: '' });\n```\n\n### useContext\n\nThis hook returns context value with optional selector.\n\nIt will only accept context created by `createContext`.\nIt will trigger re-render if only the selected value is referentially changed.\nThe selector must be stable.\nEither define selector outside render or wrap with `useCallback`.\n\nThe selector should return referentially equal result for same input for better performance.\n\n#### Parameters\n\n-   `context` **Context&lt;Value>** \n-   `selector` **function (value: Value): Selected**  (optional, default `identity as(value:Value)=>Selected`)\n\n#### Examples\n\n```javascript\nimport { useContext } from 'use-context-selector';\n\nconst firstName = useContext(PersonContext, state => state.firstName);\n```\n\n### useContextUpdate\n\nThis hook returns an update function that accepts a thunk function\n\nUse this for a function that will change a value.\n\n#### Parameters\n\n-   `context` **Context&lt;any>** \n\n#### Examples\n\n```javascript\nimport { useContextUpdate } from 'use-context-selector';\n\nconst update = useContextUpdate();\nupdate(() => setState(...));\n```\n\n## Limitations\n\n-   In order to stop propagation, `children` of a context provider has to be either created outside of the provider or memoized with `React.memo`.\n-   Neither context consumers or class components are supported.\n-   The [stale props](https://react-redux.js.org/api/hooks#stale-props-and-zombie-children) issue can't be solved in userland.\n-   Tearing is only avoided within the Provider tree. A value outside the Provider will tear. (`02_tearing_spec` fails)\n\n## Examples\n\nThe [examples](examples) folder contains working examples.\nYou can run one of them with\n\n```bash\nPORT=8080 npm run examples:01_minimal\n```\n\nand open <http://localhost:8080> in your web browser.\n\nYou can also try them in codesandbox.io:\n[01](https://codesandbox.io/s/github/dai-shi/use-context-selector/tree/master/examples/01_minimal)\n[02](https://codesandbox.io/s/github/dai-shi/use-context-selector/tree/master/examples/02_typescript)\n\n## Related projects\n\n-   [react-tracked](https://github.com/dai-shi/react-tracked)\n-   [reactive-react-redux](https://github.com/dai-shi/reactive-react-redux)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/dai-shi/use-context-selector/issues"},"homepage":"https://github.com/dai-shi/use-context-selector#readme","_id":"use-context-selector@2.0.0-alpha.7","_nodeVersion":"12.18.3","_npmVersion":"6.14.6","dist":{"integrity":"sha512-dxsLHR2QG7pyPx1Yx66ddZ5jrc7mQTd5/3+u9yWRLyNVU4LB6e6De8ZtLObZyBM+/QYUCE1KiQe2CH5IbaGCNw==","shasum":"4c2c1462a631b0f5ed47caeb175721c714e4decd","tarball":"https://registry.npmjs.org/use-context-selector/-/use-context-selector-2.0.0-alpha.7.tgz","fileCount":10,"unpackedSize":41094,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfYtgACRA9TVsSAnZWagAAl/IP/0Bi7l7KqOR4mYbga8tP\n9rpFSKHwdgwawT5x37NuqdtNRKDLXUDNbzLDl79sVJlM9Jj19T9oMExXmTwF\nP2vojKt9YCC5FkRsWmGoBJXQ0sPiEGtMvHii0GOv9deaHqOk7B4sDlDKchbB\n9cbgXLJqJ8ooGFW6pb3d3+N+H0pvT/P17QDZZIpFY+xv/NzASdEDd+TaE43t\n7HTAYZHugukPrXuWW8LiCagOHZc8wY6V6iBUATwazndtPuba/cjruJsmW2Ww\nnYDh74O7xcU9pCxnqBmaLI7e+rVvABl7xkSa07mwQcQD8u83Wf92b8EcCeh1\nWmmHtsxKsQjrXor6uM8/2R4nRRDTSSPAYiX6ibWMbX1gAkayHOWqrnAbQRwp\nWRlNv+Zyyd07PDFNO6u650dPSmu5KNHRw9SVWOd4TwEtZsvE3MVsl+CPSjAa\nKhCNhHJgMdMiFyctID+S2fPvFQjBtCihgRwvWO2VwB/8eNWnQip8kCbB5yzq\nA7qF3CVCPl8aN3yVRjUhs6JXoxZl9mQbL/jww8xebgbw9S0EWF5I6tZWB+VX\nNnRrF+4vJV/TMUenQ4RD9CYOuiLuzbd8gUhS8MTKeNjKj9J0KNlpcvPTK7PP\nEu+wSE7EtYDnD9vZ0g59r5NuHuc5kC90NurUPNtNvZU6YrqZxpMoILfPeKis\nuKik\r\n=S02q\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGkyoy4P+bYyDC7RGAgwur2JJ1JSxY3HMKDcEqlVjhmMAiEA0JVFPMDoOh2QoQSe9RkjL99gW92rBHgfi/ui304J5FM="}]},"maintainers":[{"name":"daishi","email":"daishi@axlight.com"}],"_npmUser":{"name":"daishi","email":"daishi@axlight.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/use-context-selector_2.0.0-alpha.7_1600313344274_0.15859193439614994"},"_hasShrinkwrap":false},"1.1.3":{"name":"use-context-selector","description":"React useContextSelector hook in userland","version":"1.1.3","author":{"name":"Daishi Kato"},"repository":{"type":"git","url":"git+https://github.com/dai-shi/use-context-selector.git"},"source":"./src/index.js","main":"./dist/index.umd.js","module":"./dist/index.modern.js","types":"./src/index.d.ts","sideEffects":false,"scripts":{"compile":"microbundle build -f modern,umd","test":"run-s eslint tsc-test jest","eslint":"eslint --ext .js,.ts,.tsx --ignore-pattern dist .","jest":"jest","tsc-test":"tsc --project . --noEmit","apidoc":"documentation readme --section API --markdown-toc false src/index.js","examples:01_minimal":"DIR=01_minimal EXT=js webpack-dev-server","examples:02_typescript":"DIR=02_typescript webpack-dev-server"},"keywords":["react","context","hooks"],"license":"MIT","dependencies":{},"devDependencies":{"@babel/cli":"^7.10.5","@babel/core":"^7.11.0","@babel/preset-env":"^7.11.0","@babel/preset-react":"^7.10.4","@testing-library/react":"^10.4.7","@types/react":"^16.9.44","@types/react-dom":"^16.9.8","@typescript-eslint/eslint-plugin":"^3.7.1","@typescript-eslint/parser":"^3.7.1","babel-loader":"^8.1.0","documentation":"^13.0.2","eslint":"^7.6.0","eslint-config-airbnb":"^18.2.0","eslint-plugin-import":"^2.22.0","eslint-plugin-jsx-a11y":"^6.3.1","eslint-plugin-react":"^7.20.5","eslint-plugin-react-hooks":"^4.0.8","html-webpack-plugin":"^4.3.0","jest":"^26.2.2","microbundle":"^0.12.3","npm-run-all":"^4.1.5","react":"experimental","react-dom":"experimental","ts-loader":"^8.0.2","typescript":"^3.9.7","webpack":"^4.44.1","webpack-cli":"^3.3.12","webpack-dev-server":"^3.11.0"},"peerDependencies":{"react":">=16.8.0"},"babel":{"presets":[["@babel/preset-env",{"targets":"> 0.2%, not dead"}],"@babel/preset-react"]},"gitHead":"8d1cdbd8bbb65c0bef8e6c203887028bbe12272c","bugs":{"url":"https://github.com/dai-shi/use-context-selector/issues"},"homepage":"https://github.com/dai-shi/use-context-selector#readme","_id":"use-context-selector@1.1.3","_nodeVersion":"12.18.3","_npmVersion":"6.14.6","dist":{"integrity":"sha512-xdwD8s7nvPIsZHP8MtKZQ8Q1bC4KynhXOLN9Ck8dKkuXDVOYQQ0xqe0ueFpImeJeHPpFDiN/3chmlk1PuPfGxw==","shasum":"47e9f4972df0b23c34eb3ed18057b13b595b1bb3","tarball":"https://registry.npmjs.org/use-context-selector/-/use-context-selector-1.1.3.tgz","fileCount":10,"unpackedSize":25896,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfY1kUCRA9TVsSAnZWagAABNsP/0eiPzh4lLgLfROxlRuq\nP5jP2tvIazauK/1pfbB+kXe4vjIzNyKLoTzjbBEwrwP3o1TcAI0wXBk+d+iB\nd5lRfsyF9ru2tDU7YyiJHyo8uTh37b/QLp+UZvamnOjWrO37jKiuY9+2p5OP\n0c0Mes2V5H5Q3PD7aVhCibj0RekCIJQ7PBKCibvy6lAWud5C6VNI5RrBiGil\nMjnq+q9ygEcYKt7BKh9XJDrqiyOLUZrHdl43GAP0bHSBXJPnIKYbWUvYo9jD\n1c3T5lZeIyiQDCrPG4UEp7/NDfG+J8BVLIti8uEycgNAPhMB0ODB0+X88hRZ\nLBtk118/hx53b+wRcfovlV958iV1XVMMqJJu07K29Ihdy7beQWdt6Mm7drvg\nRIXEdvTt7XgcOLLYcHPjfJ3PY+BJxjKsxZJudYOMuL7wnbwsfel9LdKcj4ZT\nF3P9j48fUDiW2XP+d3h7iwBnyWaAKfd0rXYWMCPGqcKIX4ONIx+xlzyhul9p\ng4AdQHaXjOWPSFgjtc50xNd5KKpXDe+dcATh4kRr7KoLoAscJ9/wb/yDLaDV\nMvs3j/jYn7A0hqner6c7qQR70J2SBSOUtFtmYHisBBMKjFSY11vP6Ju3VEJn\nCJJIrRjwLksheHx7u2JktlPvNfi3JP934FyizTa2+OrQG76l6e86raBp37If\neNE7\r\n=gtpp\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCb0wi0a5sufINbIqKv2QO0UFp7S1AL9NmXjZuRx6K9YgIgTckBVPG81C2UA11aZeufImlDCvWcDNZSco/7Ki3c/aU="}]},"maintainers":[{"name":"daishi","email":"daishi@axlight.com"}],"_npmUser":{"name":"daishi","email":"daishi@axlight.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/use-context-selector_1.1.3_1600346387976_0.7504690624397721"},"_hasShrinkwrap":false},"1.1.4-beta.1":{"name":"use-context-selector","description":"React useContextSelector hook in userland","version":"1.1.4-beta.1","publishConfig":{"tag":"beta"},"author":{"name":"Daishi Kato"},"repository":{"type":"git","url":"git+https://github.com/dai-shi/use-context-selector.git"},"source":"./src/index.js","main":"./dist/index.umd.js","module":"./dist/index.modern.js","types":"./src/index.d.ts","sideEffects":false,"scripts":{"compile":"microbundle build -f modern,umd","test":"run-s eslint tsc-test jest","eslint":"eslint --ext .js,.ts,.tsx --ignore-pattern dist .","jest":"jest","tsc-test":"tsc --project . --noEmit","apidoc":"documentation readme --section API --markdown-toc false src/index.js","examples:01_minimal":"DIR=01_minimal EXT=js webpack-dev-server","examples:02_typescript":"DIR=02_typescript webpack-dev-server"},"keywords":["react","context","hooks"],"license":"MIT","dependencies":{},"devDependencies":{"@babel/cli":"^7.10.5","@babel/core":"^7.11.0","@babel/preset-env":"^7.11.0","@babel/preset-react":"^7.10.4","@testing-library/react":"^10.4.7","@types/react":"^16.9.44","@types/react-dom":"^16.9.8","@typescript-eslint/eslint-plugin":"^3.7.1","@typescript-eslint/parser":"^3.7.1","babel-loader":"^8.1.0","documentation":"^13.0.2","eslint":"^7.6.0","eslint-config-airbnb":"^18.2.0","eslint-plugin-import":"^2.22.0","eslint-plugin-jsx-a11y":"^6.3.1","eslint-plugin-react":"^7.20.5","eslint-plugin-react-hooks":"^4.0.8","html-webpack-plugin":"^4.3.0","jest":"^26.2.2","microbundle":"^0.12.3","npm-run-all":"^4.1.5","react":"experimental","react-dom":"experimental","ts-loader":"^8.0.2","typescript":"^3.9.7","webpack":"^4.44.1","webpack-cli":"^3.3.12","webpack-dev-server":"^3.11.0"},"peerDependencies":{"react":">=16.8.0"},"babel":{"presets":[["@babel/preset-env",{"targets":"> 0.2%, not dead"}],"@babel/preset-react"]},"gitHead":"d6b9fd3a67c931a66c6004a45fd1972719f9858d","readme":"# use-context-selector\n\n[![CI](https://img.shields.io/github/workflow/status/dai-shi/use-context-selector/CI)](https://github.com/dai-shi/use-context-selector/actions?query=workflow%3ACI)\n[![npm](https://img.shields.io/npm/v/use-context-selector)](https://www.npmjs.com/package/use-context-selector)\n[![size](https://img.shields.io/bundlephobia/minzip/use-context-selector)](https://bundlephobia.com/result?p=use-context-selector)\n\nReact useContextSelector hook in userland\n\n## Introduction\n\nReact Context and useContext is often used to avoid prop drilling,\nhowever it's known that there's a performance issue.\nWhen a context value is changed, all components that useContext\nwill re-render.\n\n[useContextSelector](https://github.com/reactjs/rfcs/pull/119) is recently proposed.\nWhile waiting for the process, this library provides the API in userland.\n\n## Install\n\n```bash\nnpm install use-context-selector\n```\n\n## Usage\n\n```javascript\nimport React, { useState } from 'react';\nimport ReactDOM from 'react-dom';\n\nimport { createContext, useContextSelector } from 'use-context-selector';\n\nconst context = createContext(null);\n\nconst Counter1 = () => {\n  const count1 = useContextSelector(context, v => v[0].count1);\n  const setState = useContextSelector(context, v => v[1]);\n  const increment = () => setState(s => ({\n    ...s,\n    count1: s.count1 + 1,\n  }));\n  return (\n    <div>\n      <span>Count1: {count1}</span>\n      <button type=\"button\" onClick={increment}>+1</button>\n      {Math.random()}\n    </div>\n  );\n};\n\nconst Counter2 = () => {\n  const count2 = useContextSelector(context, v => v[0].count2);\n  const setState = useContextSelector(context, v => v[1]);\n  const increment = () => setState(s => ({\n    ...s,\n    count2: s.count2 + 1,\n  }));\n  return (\n    <div>\n      <span>Count2: {count2}</span>\n      <button type=\"button\" onClick={increment}>+1</button>\n      {Math.random()}\n    </div>\n  );\n};\n\nconst StateProvider = ({ children }) => {\n  const [state, setState] = useState({ count1: 0, count2: 0 });\n  return (\n    <context.Provider value={[state, setState]}>\n      {children}\n    </context.Provider>\n  );\n};\n\nconst App = () => (\n  <StateProvider>\n    <Counter1 />\n    <Counter2 />\n  </StateProvider>\n);\n\nReactDOM.render(<App />, document.getElementById('app'));\n```\n\n## Technical memo\n\nReact context by nature triggers propagation of component re-rendering\nif a value is changed. To avoid this, this library uses undocumented\nfeature of `calculateChangedBits`. It then uses a subscription model\nto force update when a component needs to re-render.\n\n## API\n\n<!-- Generated by documentation.js. Update this documentation by updating the source code. -->\n\n### createContext\n\nThis creates a special context for `useContextSelector`.\n\n#### Parameters\n\n-   `defaultValue` **any** \n\n#### Examples\n\n```javascript\nconst PersonContext = createContext({ firstName: '', familyName: '' });\n```\n\nReturns **React.Context** \n\n### useContextSelector\n\nThis hook returns context selected value by selector.\nIt will only accept context created by `createContext`.\nIt will trigger re-render if only the selected value is referentially changed.\n\n#### Parameters\n\n-   `context` **React.Context** \n-   `selector` **[Function](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/function)** \n\n#### Examples\n\n```javascript\nconst firstName = useContextSelector(PersonContext, state => state.firstName);\n```\n\nReturns **any** \n\n### useContext\n\nThis hook returns the entire context value.\nUse this instead of React.useContext for consistent behavior.\n\n#### Parameters\n\n-   `context` **React.Context** \n\n#### Examples\n\n```javascript\nconst person = useContext(PersonContext);\n```\n\nReturns **any** \n\n### BridgeProvider\n\nThis is a Provider component for bridging multiple react roots\n\n#### Parameters\n\n-   `props` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** \n    -   `props.context` **React.Context** \n    -   `props.value` **any** \n    -   `props.children` **React.ReactNote** \n\n#### Examples\n\n```javascript\nconst valueToBridge = useContext(PersonContext);\nreturn (\n  <Renderer>\n    <BridgeProvider context={PersonContext} value={valueToBridge}>\n      {children}\n    </Bidge>\n  </Renderer>\n);\n```\n\nReturns **React.ReactElement** \n\n## Limitations\n\n-   Subscriptions are per-context basis. So, even if there are multiple context providers in a component tree, all components are subscribed to all providers. This may lead false positives (extra re-renders).\n-   In order to stop propagation, `children` of a context provider has to be either created outside of the provider or memoized with `React.memo`.\n-   Provider trigger re-renders only if the context value is referentially changed.\n-   Context consumers are not supported.\n-   The [stale props](https://react-redux.js.org/api/hooks#stale-props-and-zombie-children) issue can't be solved in userland. (workaround with try-catch)\n\n## Examples\n\nThe [examples](examples) folder contains working examples.\nYou can run one of them with\n\n```bash\nPORT=8080 npm run examples:01_minimal\n```\n\nand open <http://localhost:8080> in your web browser.\n\nYou can also try them in codesandbox.io:\n[01](https://codesandbox.io/s/github/dai-shi/use-context-selector/tree/master/examples/01_minimal)\n[02](https://codesandbox.io/s/github/dai-shi/use-context-selector/tree/master/examples/02_typescript)\n\n## Related projects\n\n-   [react-tracked](https://github.com/dai-shi/react-tracked)\n-   [reactive-react-redux](https://github.com/dai-shi/reactive-react-redux)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/dai-shi/use-context-selector/issues"},"homepage":"https://github.com/dai-shi/use-context-selector#readme","_id":"use-context-selector@1.1.4-beta.1","_nodeVersion":"12.18.3","_npmVersion":"6.14.6","dist":{"integrity":"sha512-jT/7CgfEA/Zg83CmO85EwZdNRUlBTWfn+mP28GWTx1IAgYPcbIhVfSKA9wgDyowXQQGQkuu++gV7/bpNSDXV/Q==","shasum":"905c7401b17f048eb646891fa3e770bd2accc2b0","tarball":"https://registry.npmjs.org/use-context-selector/-/use-context-selector-1.1.4-beta.1.tgz","fileCount":10,"unpackedSize":32366,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfaDxECRA9TVsSAnZWagAAIcYP+wTetw3sia1s9taJ+Hle\n2nsi+e2rcWeM7P6sk57/U9XIa9AgpTOvcEEKJuCzk+MUazC55hVTJ7SzwvSw\nGL/0Hd7T7Rg1gkhK3v7qydIQUuwsx+lLwKuR9rScSHmmzIW4OUMTAYFO+JwH\nfCrppK8MUYM3x87Cvor7jyF2kBZ/EKkLrXZcTfS31s1sBQj/f1FAMOwgENk+\n+WtJtTXvb//mtZqRjqLsflt3WGOQGhVSj5WtrlWCCqx04G3GiZD9lfyTcuzV\nTjGuVwvRqaUPRWF27252i/BJgmypYjVnr9SYiX18TP3YyHDKBrQXAFnhqoxC\nSErvP76VEGwd1w8KPvzEeyPducE8wa6Syr0tl1C1a6+YjbKIa3rj53V5+EKG\nuxv1qjzKYNlcHKhIJb/A96CvkHJ7ED781hjkhbKVmHP/YlQPri9n8usGEwSH\npttN8YzFYvUyHKO6ytAvUKmSczTXQV38mXprFwJSnr4fpLT4U79tHIzTtO4o\nWAd84z4kchihTA5m0skWlSxuAlBleh4PrqUbZzOdofU+jdjTKcspYm+bTuJP\nrfu0jMcP6y6nEJc508hPwXnzV0pp5UvU/Kw/gp8ZwiG9KUhVE/2ZMVsup13x\nSGt1LFOXzfrmt/nsRRp59Kt/gbml7kbhVMFy0Smk1RFJC0EfQDnV9hWWDdki\nDzfq\r\n=QSZ1\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCpKS9R6MdT6qYwcw50Xp3HPYwNCQTN+szzjcpsMc+PbQIgYKoMI05PTZbyMi/G48eSvHzCOzkfFIrfdRcGkdvTNVg="}]},"maintainers":[{"name":"daishi","email":"daishi@axlight.com"}],"_npmUser":{"name":"daishi","email":"daishi@axlight.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/use-context-selector_1.1.4-beta.1_1600666692367_0.8894145319214171"},"_hasShrinkwrap":false},"1.1.4-beta.2":{"name":"use-context-selector","description":"React useContextSelector hook in userland","version":"1.1.4-beta.2","publishConfig":{"tag":"beta"},"author":{"name":"Daishi Kato"},"repository":{"type":"git","url":"git+https://github.com/dai-shi/use-context-selector.git"},"source":"./src/index.js","main":"./dist/index.umd.js","module":"./dist/index.modern.js","types":"./src/index.d.ts","sideEffects":false,"scripts":{"compile":"microbundle build -f modern,umd","test":"run-s eslint tsc-test jest","eslint":"eslint --ext .js,.ts,.tsx --ignore-pattern dist .","jest":"jest","tsc-test":"tsc --project . --noEmit","apidoc":"documentation readme --section API --markdown-toc false src/index.js","examples:01_minimal":"DIR=01_minimal EXT=js webpack-dev-server","examples:02_typescript":"DIR=02_typescript webpack-dev-server"},"keywords":["react","context","hooks"],"license":"MIT","dependencies":{},"devDependencies":{"@babel/cli":"^7.10.5","@babel/core":"^7.11.0","@babel/preset-env":"^7.11.0","@babel/preset-react":"^7.10.4","@testing-library/react":"^10.4.7","@types/react":"^16.9.44","@types/react-dom":"^16.9.8","@typescript-eslint/eslint-plugin":"^3.7.1","@typescript-eslint/parser":"^3.7.1","babel-loader":"^8.1.0","documentation":"^13.0.2","eslint":"^7.6.0","eslint-config-airbnb":"^18.2.0","eslint-plugin-import":"^2.22.0","eslint-plugin-jsx-a11y":"^6.3.1","eslint-plugin-react":"^7.20.5","eslint-plugin-react-hooks":"^4.0.8","html-webpack-plugin":"^4.3.0","jest":"^26.2.2","microbundle":"^0.12.3","npm-run-all":"^4.1.5","react":"experimental","react-dom":"experimental","ts-loader":"^8.0.2","typescript":"^3.9.7","webpack":"^4.44.1","webpack-cli":"^3.3.12","webpack-dev-server":"^3.11.0"},"peerDependencies":{"react":">=16.8.0"},"babel":{"presets":[["@babel/preset-env",{"targets":"> 0.2%, not dead"}],"@babel/preset-react"]},"gitHead":"a5aa035db2d84cc7c9509780ce1eb2e1213294e9","readme":"# use-context-selector\n\n[![CI](https://img.shields.io/github/workflow/status/dai-shi/use-context-selector/CI)](https://github.com/dai-shi/use-context-selector/actions?query=workflow%3ACI)\n[![npm](https://img.shields.io/npm/v/use-context-selector)](https://www.npmjs.com/package/use-context-selector)\n[![size](https://img.shields.io/bundlephobia/minzip/use-context-selector)](https://bundlephobia.com/result?p=use-context-selector)\n\nReact useContextSelector hook in userland\n\n## Introduction\n\nReact Context and useContext is often used to avoid prop drilling,\nhowever it's known that there's a performance issue.\nWhen a context value is changed, all components that useContext\nwill re-render.\n\n[useContextSelector](https://github.com/reactjs/rfcs/pull/119) is recently proposed.\nWhile waiting for the process, this library provides the API in userland.\n\n## Install\n\n```bash\nnpm install use-context-selector\n```\n\n## Usage\n\n```javascript\nimport React, { useState } from 'react';\nimport ReactDOM from 'react-dom';\n\nimport { createContext, useContextSelector } from 'use-context-selector';\n\nconst context = createContext(null);\n\nconst Counter1 = () => {\n  const count1 = useContextSelector(context, v => v[0].count1);\n  const setState = useContextSelector(context, v => v[1]);\n  const increment = () => setState(s => ({\n    ...s,\n    count1: s.count1 + 1,\n  }));\n  return (\n    <div>\n      <span>Count1: {count1}</span>\n      <button type=\"button\" onClick={increment}>+1</button>\n      {Math.random()}\n    </div>\n  );\n};\n\nconst Counter2 = () => {\n  const count2 = useContextSelector(context, v => v[0].count2);\n  const setState = useContextSelector(context, v => v[1]);\n  const increment = () => setState(s => ({\n    ...s,\n    count2: s.count2 + 1,\n  }));\n  return (\n    <div>\n      <span>Count2: {count2}</span>\n      <button type=\"button\" onClick={increment}>+1</button>\n      {Math.random()}\n    </div>\n  );\n};\n\nconst StateProvider = ({ children }) => {\n  const [state, setState] = useState({ count1: 0, count2: 0 });\n  return (\n    <context.Provider value={[state, setState]}>\n      {children}\n    </context.Provider>\n  );\n};\n\nconst App = () => (\n  <StateProvider>\n    <Counter1 />\n    <Counter2 />\n  </StateProvider>\n);\n\nReactDOM.render(<App />, document.getElementById('app'));\n```\n\n## Technical memo\n\nReact context by nature triggers propagation of component re-rendering\nif a value is changed. To avoid this, this library uses undocumented\nfeature of `calculateChangedBits`. It then uses a subscription model\nto force update when a component needs to re-render.\n\n## API\n\n<!-- Generated by documentation.js. Update this documentation by updating the source code. -->\n\n### createContext\n\nThis creates a special context for `useContextSelector`.\n\n#### Parameters\n\n-   `defaultValue` **any** \n\n#### Examples\n\n```javascript\nconst PersonContext = createContext({ firstName: '', familyName: '' });\n```\n\nReturns **React.Context** \n\n### useContextSelector\n\nThis hook returns context selected value by selector.\nIt will only accept context created by `createContext`.\nIt will trigger re-render if only the selected value is referentially changed.\n\n#### Parameters\n\n-   `context` **React.Context** \n-   `selector` **[Function](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/function)** \n\n#### Examples\n\n```javascript\nconst firstName = useContextSelector(PersonContext, state => state.firstName);\n```\n\nReturns **any** \n\n### useContext\n\nThis hook returns the entire context value.\nUse this instead of React.useContext for consistent behavior.\n\n#### Parameters\n\n-   `context` **React.Context** \n\n#### Examples\n\n```javascript\nconst person = useContext(PersonContext);\n```\n\nReturns **any** \n\n### BridgeProvider\n\nThis is a Provider component for bridging multiple react roots\n\n#### Parameters\n\n-   `props` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** \n    -   `props.context` **React.Context** \n    -   `props.value` **any** \n    -   `props.children` **React.ReactNote** \n\n#### Examples\n\n```javascript\nconst valueToBridge = useContext(PersonContext);\nreturn (\n  <Renderer>\n    <BridgeProvider context={PersonContext} value={valueToBridge}>\n      {children}\n    </Bidge>\n  </Renderer>\n);\n```\n\nReturns **React.ReactElement** \n\n## Limitations\n\n-   Subscriptions are per-context basis. So, even if there are multiple context providers in a component tree, all components are subscribed to all providers. This may lead false positives (extra re-renders).\n-   In order to stop propagation, `children` of a context provider has to be either created outside of the provider or memoized with `React.memo`.\n-   Provider trigger re-renders only if the context value is referentially changed.\n-   Context consumers are not supported.\n-   The [stale props](https://react-redux.js.org/api/hooks#stale-props-and-zombie-children) issue can't be solved in userland. (workaround with try-catch)\n\n## Examples\n\nThe [examples](examples) folder contains working examples.\nYou can run one of them with\n\n```bash\nPORT=8080 npm run examples:01_minimal\n```\n\nand open <http://localhost:8080> in your web browser.\n\nYou can also try them in codesandbox.io:\n[01](https://codesandbox.io/s/github/dai-shi/use-context-selector/tree/master/examples/01_minimal)\n[02](https://codesandbox.io/s/github/dai-shi/use-context-selector/tree/master/examples/02_typescript)\n\n## Related projects\n\n-   [react-tracked](https://github.com/dai-shi/react-tracked)\n-   [reactive-react-redux](https://github.com/dai-shi/reactive-react-redux)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/dai-shi/use-context-selector/issues"},"homepage":"https://github.com/dai-shi/use-context-selector#readme","_id":"use-context-selector@1.1.4-beta.2","_nodeVersion":"12.18.3","_npmVersion":"6.14.6","dist":{"integrity":"sha512-vDDqicyGN0KcAcyI2PuX/fPE723s9Ys1Zp1jry/4c0atjSFWWDjqLb64ONZBMRbvOjh8YgfzhzCf2DM5sZFm2g==","shasum":"e0962ea6ef0ede523f279e7c8383e79775ebb009","tarball":"https://registry.npmjs.org/use-context-selector/-/use-context-selector-1.1.4-beta.2.tgz","fileCount":10,"unpackedSize":30242,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfaEnrCRA9TVsSAnZWagAAFhgP/jHv2tknFxYiapV2r5oJ\nXPs8R9OKJnDbelJn/WTqVxPlcEvdGKokpdVR93J2M7h5cAUZ5vH0aIZ1P/FD\njBkE4SgLNU8qNsCBs7NSZQzysuDzRrxy68/50+OQKSgQQSfdp5oHpzOVDI9r\nc1IiYFE4GNj99804pWDbnvoh4gEzccAP9c+HmUe0Mv1OAYk3Lm7ukvoo+g/k\nU4QntVQlQbHr2P1B2qqAmLa/U+CI/St9rjrzBbWBe28Xv9igbVgqVuPlCfci\n5z5CeCpYrCrQHfKh6Czp8q45DEScDsZmmEittQGlYigU9jJQzTT5OAH10pDN\n/PcPewKZa1VWyL5fuKSNyXgzoms1gdbla4vnS2o1wWyoR4ywQbW+SwXLnjJ8\nPkHRjhpPxhOU4Js8MkrOpTIEdW93wcB52X9Bs/LIlPY7f1XAnJSzT2VKv6lz\nljRXDwXxLBRoLDLsGBrpyfsS4XljhvAUEQzpDN30sDEtNbThsUnDuIuFKUso\n4V+jyNXxLwbRC5zUHEINvn4gn4beGtSNudDkyBH8EVu0e2FlZVNK1cazGNW1\nrbT/myWd2Ttic6jwB1WiJwf9obD6G/39vJA0Tcw27O1db9Njqkc5/07K3bqj\n/0UgUK4aRYpe5yNDspaw6HDPGfyLGtOFRJLihuiH2EXbExV3S5qZ6fEmNbwn\n+Rhz\r\n=fmKp\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGM5AsF0i28ypubh2KDkPAkVdW7SgUwBBWdDFHcJXATGAiEApd6JpNvhcmWjWrw//EZYpRED4Ya/JdSwCgPN+SpWchw="}]},"maintainers":[{"name":"daishi","email":"daishi@axlight.com"}],"_npmUser":{"name":"daishi","email":"daishi@axlight.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/use-context-selector_1.1.4-beta.2_1600670186611_0.5793301320954969"},"_hasShrinkwrap":false},"1.1.4":{"name":"use-context-selector","description":"React useContextSelector hook in userland","version":"1.1.4","author":{"name":"Daishi Kato"},"repository":{"type":"git","url":"git+https://github.com/dai-shi/use-context-selector.git"},"source":"./src/index.js","main":"./dist/index.umd.js","module":"./dist/index.modern.js","types":"./src/index.d.ts","sideEffects":false,"scripts":{"compile":"microbundle build -f modern,umd","test":"run-s eslint tsc-test jest","eslint":"eslint --ext .js,.ts,.tsx --ignore-pattern dist .","jest":"jest","tsc-test":"tsc --project . --noEmit","apidoc":"documentation readme --section API --markdown-toc false src/index.js","examples:01_minimal":"DIR=01_minimal EXT=js webpack-dev-server","examples:02_typescript":"DIR=02_typescript webpack-dev-server"},"keywords":["react","context","hooks"],"license":"MIT","dependencies":{},"devDependencies":{"@babel/cli":"^7.10.5","@babel/core":"^7.11.0","@babel/preset-env":"^7.11.0","@babel/preset-react":"^7.10.4","@testing-library/react":"^10.4.7","@types/react":"^16.9.44","@types/react-dom":"^16.9.8","@typescript-eslint/eslint-plugin":"^3.7.1","@typescript-eslint/parser":"^3.7.1","babel-loader":"^8.1.0","documentation":"^13.0.2","eslint":"^7.6.0","eslint-config-airbnb":"^18.2.0","eslint-plugin-import":"^2.22.0","eslint-plugin-jsx-a11y":"^6.3.1","eslint-plugin-react":"^7.20.5","eslint-plugin-react-hooks":"^4.0.8","html-webpack-plugin":"^4.3.0","jest":"^26.2.2","microbundle":"^0.12.3","npm-run-all":"^4.1.5","react":"experimental","react-dom":"experimental","ts-loader":"^8.0.2","typescript":"^3.9.7","webpack":"^4.44.1","webpack-cli":"^3.3.12","webpack-dev-server":"^3.11.0"},"peerDependencies":{"react":">=16.8.0"},"babel":{"presets":[["@babel/preset-env",{"targets":"> 0.2%, not dead"}],"@babel/preset-react"]},"gitHead":"7f9c0614ea7ebc254a61c86ec28bd5fd45331572","bugs":{"url":"https://github.com/dai-shi/use-context-selector/issues"},"homepage":"https://github.com/dai-shi/use-context-selector#readme","_id":"use-context-selector@1.1.4","_nodeVersion":"12.18.3","_npmVersion":"6.14.6","dist":{"integrity":"sha512-qJ1KFw6G7XUTdyiUODz+XO0fRdfB6qApjZP/R+uqtO5ptGdmmq276z2my5hU8SFhzFEwXCj7tFNFA9w8LVkjJQ==","shasum":"11c1cc3856a7ea06972a7b1e0402ce86b9a8ed31","tarball":"https://registry.npmjs.org/use-context-selector/-/use-context-selector-1.1.4.tgz","fileCount":10,"unpackedSize":30268,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfaf7LCRA9TVsSAnZWagAAibMP+wTTBtsICwskF0QjelK8\ncF9hD/CgOeoDlFNLnULZ6vJiIQZ+ep1n9ApEnTFq+CtjJ1xz/Z3WNQuhHRkA\nRkmp/wp/U6BMXIn+KeDKPCnyARkdazc1vCnSEyOKpyvEZHad1XUEiKAzva8d\n2oJiKSajAjQJYCot6Mcng6om0mzJ+QUtdnN6ojJSG1ztccvAquQlBurgn9du\nndW7BDyWGYE8I3f3+1Y5pGISdq0aMwnmvT/HyyIr5uwkZG/vGXPilYwcLTze\nVBrCcR16CqH6N5uoXCJEmSJsBfKNFaRxkCvwsYQHAxP45G1ZvN1+NA0slHc8\nGs3xeX302buHMaUSCd9BK2urIhptVRulscCwXrQWtLI/pHTgOQ39f+zdSdNE\nWf56nDo8c/HHphgE/64xytw1z5yxK+tjDCvmfdY3CWsJ0Lux02GtFMWEmJKo\nTpkdNE2Rw8bTnJP/Pjs5u4xjvc9E/jThjTBoNdfX3Wc+7yJVzm4BqzbVDmFQ\nmAHmWCDq08sDVSHpG8x8b+T49pQVjqYgGQRRxmEsjE+NKHC84QQp5IV/yLIB\nLI7AKIg0/1XtaOuQXa3mT4U+ZG0xnoCjZ7unxnf0c0MQT1Z4LTJ4M26OFgLY\nq38B5U91qTARl9GjxTzU9CisigDFAEagSgAAvV8vFUf74pwPPmJc8pt+ONZM\nqdwn\r\n=1UQR\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQD8f3ymuNmxoGIEt/GhnNR7XhMGCJt7uOSG4uHwCQWsfgIgCQFcRtkAffaPO4DdYBYmCyecMufoM7u0xZhgUW3qSWM="}]},"maintainers":[{"name":"daishi","email":"daishi@axlight.com"}],"_npmUser":{"name":"daishi","email":"daishi@axlight.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/use-context-selector_1.1.4_1600782027424_0.602649572771575"},"_hasShrinkwrap":false},"2.0.0-alpha.9":{"name":"use-context-selector","description":"React useContext with selector support in userland","version":"2.0.0-alpha.9","publishConfig":{"tag":"next"},"author":{"name":"Daishi Kato"},"repository":{"type":"git","url":"git+https://github.com/dai-shi/use-context-selector.git"},"source":"./src/index.ts","main":"./dist/index.umd.js","module":"./dist/index.modern.js","types":"./dist/src/index.d.ts","sideEffects":false,"scripts":{"compile":"microbundle build -f modern,umd","test":"run-s eslint tsc-test jest","eslint":"eslint --ext .js,.ts,.tsx --ignore-pattern dist .","jest":"jest --preset ts-jest/presets/js-with-ts __tests__/*.tsx","tsc-test":"tsc --project . --noEmit","apidoc":"documentation readme --section API --markdown-toc false --parse-extension ts src/*.ts","examples:01_minimal":"DIR=01_minimal EXT=js webpack-dev-server","examples:02_typescript":"DIR=02_typescript webpack-dev-server"},"keywords":["react","context","hooks"],"license":"MIT","dependencies":{},"devDependencies":{"@testing-library/react":"^10.4.7","@types/jest":"^26.0.8","@types/react":"^16.9.44","@types/react-dom":"^16.9.8","@types/scheduler":"^0.16.1","@typescript-eslint/eslint-plugin":"^3.7.1","@typescript-eslint/parser":"^3.7.1","documentation":"^13.0.2","eslint":"^7.6.0","eslint-config-airbnb":"^18.2.0","eslint-plugin-import":"^2.22.0","eslint-plugin-jsx-a11y":"^6.3.1","eslint-plugin-react":"^7.20.5","eslint-plugin-react-hooks":"^4.0.8","html-webpack-plugin":"^4.3.0","jest":"^26.2.2","microbundle":"^0.12.3","npm-run-all":"^4.1.5","react":"experimental","react-dom":"experimental","scheduler":"experimental","ts-jest":"^26.1.4","ts-loader":"^8.0.2","typescript":"^3.9.7","webpack":"^4.44.1","webpack-cli":"^3.3.12","webpack-dev-server":"^3.11.0"},"peerDependencies":{"react":">=16.14.0","scheduler":">=0.20.0"},"gitHead":"444631371bf076839146ea23a6fef9e51eb5a205","readme":"# use-context-selector\n\n[![CI](https://img.shields.io/github/workflow/status/dai-shi/use-context-selector/CI)](https://github.com/dai-shi/use-context-selector/actions?query=workflow%3ACI)\n[![npm](https://img.shields.io/npm/v/use-context-selector)](https://www.npmjs.com/package/use-context-selector)\n[![size](https://img.shields.io/bundlephobia/minzip/use-context-selector)](https://bundlephobia.com/result?p=use-context-selector)\n\nReact useContext with selector support in userland\n\n## Introduction\n\nReact Context and useContext is often used to avoid prop drilling,\nhowever it's known that there's a performance issue.\nWhen a context value is changed, all components that useContext\nwill re-render.\n\nTo solve this issue,\n[useContextSelector](https://github.com/reactjs/rfcs/pull/119)\nis proposed and later proposed\n[Speculative Mode](https://github.com/reactjs/rfcs/pull/150)\nwith context selector support.\nThis library provides the API in userland.\n\nv1 uses `calculateChangedBits=()=>0` technique to stop propagation,\nwhile v2 uses `useMutableSource`.\n\n## Install\n\n```bash\nnpm install use-context-selector\n```\n\n## Usage\n\n```javascript\nimport React, { useState } from 'react';\nimport ReactDOM from 'react-dom';\n\nimport { createContext, useContextSelector } from 'use-context-selector';\n\nconst context = createContext(null);\n\nconst Counter1 = () => {\n  const count1 = useContextSelector(context, v => v[0].count1);\n  const setState = useContextSelector(context, v => v[1]);\n  const increment = () => setState(s => ({\n    ...s,\n    count1: s.count1 + 1,\n  }));\n  return (\n    <div>\n      <span>Count1: {count1}</span>\n      <button type=\"button\" onClick={increment}>+1</button>\n      {Math.random()}\n    </div>\n  );\n};\n\nconst Counter2 = () => {\n  const count2 = useContextSelector(context, v => v[0].count2);\n  const setState = useContextSelector(context, v => v[1]);\n  const increment = () => setState(s => ({\n    ...s,\n    count2: s.count2 + 1,\n  }));\n  return (\n    <div>\n      <span>Count2: {count2}</span>\n      <button type=\"button\" onClick={increment}>+1</button>\n      {Math.random()}\n    </div>\n  );\n};\n\nconst StateProvider = ({ children }) => {\n  const [state, setState] = useState({ count1: 0, count2: 0 });\n  return (\n    <context.Provider value={[state, setState]}>\n      {children}\n    </context.Provider>\n  );\n};\n\nconst App = () => (\n  <StateProvider>\n    <Counter1 />\n    <Counter2 />\n  </StateProvider>\n);\n\nReactDOM.render(<App />, document.getElementById('app'));\n```\n\n## Migrating from v1 to v2\n\nIn v1:\n\n```js\nuseContextSelector(context, state => state.count);\n```\n\nIn v2:\n\n```js\nuseContext(context, useCallback(state => state.count, []));\n```\n\nIn this case, you can (should) also define the selector function outside render.\n\n## API\n\n<!-- Generated by documentation.js. Update this documentation by updating the source code. -->\n\n### createContext\n\nThis creates a special context for selector-enabled `useContext`.\n\nIt doesn't pass its value but a ref of the value.\nUnlike the original context provider, this context provider\nexpects the context value to be immutable and stable.\n\n#### Parameters\n\n-   `defaultValue` **Value** \n\n#### Examples\n\n```javascript\nimport { createContext } from 'use-context-selector';\n\nconst PersonContext = createContext({ firstName: '', familyName: '' });\n```\n\n### useContext\n\nThis hook returns context value with optional selector.\n\nIt will only accept context created by `createContext`.\nIt will trigger re-render if only the selected value is referentially changed.\nThe selector must be stable.\nEither define selector outside render or wrap with `useCallback`.\n\nThe selector should return referentially equal result for same input for better performance.\n\n#### Parameters\n\n-   `context` **Context&lt;Value>** \n-   `selector` **function (value: Value): Selected**  (optional, default `identity as(value:Value)=>Selected`)\n\n#### Examples\n\n```javascript\nimport { useContext } from 'use-context-selector';\n\nconst firstName = useContext(PersonContext, state => state.firstName);\n```\n\n### useContextUpdate\n\nThis hook returns an update function that accepts a thunk function\n\nUse this for a function that will change a value.\n\n#### Parameters\n\n-   `context` **Context&lt;any>** \n\n#### Examples\n\n```javascript\nimport { useContextUpdate } from 'use-context-selector';\n\nconst update = useContextUpdate();\nupdate(() => setState(...));\n```\n\n### BridgeProvider\n\nThis is a Provider component for bridging multiple react roots\n\nType: React.FC&lt;{context: Context&lt;any>, value: any}>\n\n#### Parameters\n\n-   `$0` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** \n    -   `$0.context`  \n    -   `$0.value`  \n    -   `$0.children`  \n\n#### Examples\n\n```javascript\nconst valueToBridge = useContext(PersonContext);\nreturn (\n  <Renderer>\n    <BridgeProvider context={PersonContext} value={valueToBridge}>\n      {children}\n    </BridgeProvider>\n  </Renderer>\n);\n```\n\n## Limitations\n\n-   In order to stop propagation, `children` of a context provider has to be either created outside of the provider or memoized with `React.memo`.\n-   Neither context consumers or class components are supported.\n-   The [stale props](https://react-redux.js.org/api/hooks#stale-props-and-zombie-children) issue can't be solved in userland.\n-   Tearing is only avoided within the Provider tree. A value outside the Provider will tear. (`02_tearing_spec` fails)\n\n## Examples\n\nThe [examples](examples) folder contains working examples.\nYou can run one of them with\n\n```bash\nPORT=8080 npm run examples:01_minimal\n```\n\nand open <http://localhost:8080> in your web browser.\n\nYou can also try them in codesandbox.io:\n[01](https://codesandbox.io/s/github/dai-shi/use-context-selector/tree/master/examples/01_minimal)\n[02](https://codesandbox.io/s/github/dai-shi/use-context-selector/tree/master/examples/02_typescript)\n\n## Related projects\n\n-   [react-tracked](https://github.com/dai-shi/react-tracked)\n-   [reactive-react-redux](https://github.com/dai-shi/reactive-react-redux)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/dai-shi/use-context-selector/issues"},"homepage":"https://github.com/dai-shi/use-context-selector#readme","_id":"use-context-selector@2.0.0-alpha.9","_nodeVersion":"12.18.4","_npmVersion":"6.14.6","dist":{"integrity":"sha512-fpkGKvjtdIB599NFCHKrk2wb+1FhuY8OWimBCvGU8GrvTErGPwrcAM1wHXsc8MNkUlsgNPjVHC/x+egtddWeNQ==","shasum":"bc932267ee5ac19e12f0845a7bcd1cf2b243d43f","tarball":"https://registry.npmjs.org/use-context-selector/-/use-context-selector-2.0.0-alpha.9.tgz","fileCount":10,"unpackedSize":45982,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfcyINCRA9TVsSAnZWagAAl8EP/1s1JLcYlpRQAMmfuNmP\n/Ar69MDxldEnNCvf7JBAvFdDx/lA+L0HQhjc5nRS7MJqjh9Md7JCxaZTbNbt\nNXPpQMKVYVymbb0ufyUXf8okUQEWQJ8zAqh80R87qnhUP0IkmCpv7bZJjukL\nG2mZhwq535kFQZHArQyK3rAPTgHxkbpVa1UEQyZNl4aDOemVR6AkzBoNjZvV\ng8TjVykzoK60amcqMo2+b3Ch011SGklLeDjK81eEijvy0JGjFu18idA/h0YL\n0s3ZzDZf3L9eZgzXhpUuL15CwcT78TLKjM8spTGHBU0Z4iexrO2M7+G5Eted\nSTQi1aTI5Ia2nfk1gCq6v1qhB8qHc2fk82nUofuoQAwwGOAaJFMeyCwMWPIS\nUZfcKO0ay8plAmgSZ0pTt4XIdTeHeOJPIqKvsMiiAGOYIj5vNWJFtAJ1bBae\nNZ+lZ6MDGzCK9SHMWq6SziSZddW/Oh8uwrD8KztAlknE9NY+ratcmXUxeRtL\nefmBdUgXzgPpUWl0Y/PHndxQxR9xihqYmr/pJXYK5wQwvHqmZ+1wnuw3ZXew\nWTy1WBGSjUw5E2vMao2VvtZ6FMxcklDlgLEIiQdXWBYKAAkOCcVpW1knCtWC\nOu7n0TYIH1ArJ3KKdFu1IajMNe4cP05EeSsHnN/G7BAHRIRog+YXJ0rNYlZx\nRUOk\r\n=QVKf\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCHBlofqXFVz87dJ2rEs0gLmp9d86oqd6dVzSNe85YS/QIhAJeAgA7tCNNz+hORIvksUcSpEUCblaInmtcUNzXEGHe0"}]},"maintainers":[{"name":"daishi","email":"daishi@axlight.com"}],"_npmUser":{"name":"daishi","email":"daishi@axlight.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/use-context-selector_2.0.0-alpha.9_1601380877299_0.5848975092609572"},"_hasShrinkwrap":false},"1.2.0":{"name":"use-context-selector","description":"React useContextSelector hook in userland","version":"1.2.0","author":{"name":"Daishi Kato"},"repository":{"type":"git","url":"git+https://github.com/dai-shi/use-context-selector.git"},"source":"./src/index.js","main":"./dist/index.umd.js","module":"./dist/index.modern.js","types":"./src/index.d.ts","sideEffects":false,"scripts":{"compile":"microbundle build -f modern,umd","test":"run-s eslint tsc-test jest","eslint":"eslint --ext .js,.ts,.tsx --ignore-pattern dist .","jest":"jest","tsc-test":"tsc --project . --noEmit","apidoc":"documentation readme --section API --markdown-toc false src/index.js","examples:01_minimal":"DIR=01_minimal EXT=js webpack-dev-server","examples:02_typescript":"DIR=02_typescript webpack-dev-server"},"keywords":["react","context","hooks"],"license":"MIT","dependencies":{},"devDependencies":{"@babel/cli":"^7.11.6","@babel/core":"^7.11.6","@babel/preset-env":"^7.11.5","@babel/preset-react":"^7.10.4","@testing-library/react":"^11.0.4","@types/react":"^16.9.49","@types/react-dom":"^16.9.8","@typescript-eslint/eslint-plugin":"^4.3.0","@typescript-eslint/parser":"^4.3.0","babel-loader":"^8.1.0","documentation":"^13.0.2","eslint":"^7.10.0","eslint-config-airbnb":"^18.2.0","eslint-plugin-import":"^2.22.1","eslint-plugin-jsx-a11y":"^6.3.1","eslint-plugin-react":"^7.21.2","eslint-plugin-react-hooks":"^4.1.2","html-webpack-plugin":"^4.5.0","jest":"^26.4.2","microbundle":"^0.12.4","npm-run-all":"^4.1.5","react":"^16.13.1","react-dom":"^16.13.1","scheduler":"^0.19.1","ts-loader":"^8.0.4","typescript":"^4.0.3","webpack":"^4.44.2","webpack-cli":"^3.3.12","webpack-dev-server":"^3.11.0"},"peerDependencies":{"react":">=16.8.0","scheduler":">=0.19.0","react-dom":"*"},"peerDependenciesMeta":{"react-dom":{"optional":true}},"babel":{"presets":[["@babel/preset-env",{"targets":"> 0.2%, not dead"}],"@babel/preset-react"]},"gitHead":"9062d6bc13913f4238ddc1e9b5db93992b48e7fa","bugs":{"url":"https://github.com/dai-shi/use-context-selector/issues"},"homepage":"https://github.com/dai-shi/use-context-selector#readme","_id":"use-context-selector@1.2.0","_nodeVersion":"12.18.4","_npmVersion":"6.14.6","dist":{"integrity":"sha512-tqYegNbp3rJ7Uq5bvknGiTL0iyPISyobQtbxvK06VMBbyhnJo0aUYdUUPbDgQQMpbLxKH6Hbk8jiX7fkFPYc4A==","shasum":"186e312cac56a3e1001d2f1bd7696ca8ed8a91fc","tarball":"https://registry.npmjs.org/use-context-selector/-/use-context-selector-1.2.0.tgz","fileCount":12,"unpackedSize":39062,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfddE4CRA9TVsSAnZWagAAEowQAJHpm2Sb1gYdy2RFAjGX\nl1SUXKE8Xbo4dT7RP2rfDhzEpH+jUNfIXC3zVdlLlVBp+FH3CQZuD8omLxE+\ngXxm79rLdCaetxTOw3Fgp7TQwVWhIIAXr2Gy3YLmpyCSPMFGASQDIlsHSpmM\njdEswo3BfqN0NvOqQ33dOSv/x5Ogp9+eh4ntS/DXyhmpdiaoDJFMEBORUrET\npVmN0R1I6yiavT3w/yL0EEcSuX0VYT8WPjrAmPhglr6mxc+JkLmGDadzE/XC\n6ucP9MxVmGetQOcM5KqE/bUI6OStGmtJvMiDwYkXxLCAPJoJgCv4eliKgToO\ni+8RmQO/OViUK7JIH8vvRbzMWim/SPsiePSc8+9d2VjPSHSAk/XC+wtOlgGG\nobF8gAufHCobO3BTedUR4xIyw0Z4xmQ06m+SePUH8xey2IrQASYEG6Ze1KXk\nd7gbCFVV+t3iRNPDcOYiBfZO4TqTOmIiTrnyZzjFwg1Xlfsw5ErTvR/YvwNY\nXr5JSpuYhne4gUs06TjVWyRJcGYOxvpc8fHiNCySJKiFz5queJ480Ls7aBBF\nS5bp6ynh3DXKLboyMDW04CUGNGiiffyEPsUi4WyC5W0pM0qVZ8P6hzTUFsm6\npMj/VHlzF8yeXsLsd/cckJ5oeyvvaSXESCx/VDlGfkhfn8uceflAETF6Hmz6\nrb5G\r\n=yVXG\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDnKlFZHZHh8AXen3VrskDfQKysVF8jqVYe2gRz3QyQUwIgcNn+I7UObdi4qo3OieKd5PkJk21qx5ICAtrnHaQ5Uuo="}]},"maintainers":[{"name":"daishi","email":"daishi@axlight.com"}],"_npmUser":{"name":"daishi","email":"daishi@axlight.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/use-context-selector_1.2.0_1601556792060_0.09024470578304733"},"_hasShrinkwrap":false},"1.2.1":{"name":"use-context-selector","description":"React useContextSelector hook in userland","version":"1.2.1","author":{"name":"Daishi Kato"},"repository":{"type":"git","url":"git+https://github.com/dai-shi/use-context-selector.git"},"source":"./src/index.js","main":"./dist/index.umd.js","module":"./dist/index.modern.js","types":"./src/index.d.ts","sideEffects":false,"scripts":{"compile":"microbundle build -f modern,umd","test":"run-s eslint tsc-test jest","eslint":"eslint --ext .js,.ts,.tsx --ignore-pattern dist .","jest":"jest","tsc-test":"tsc --project . --noEmit","apidoc":"documentation readme --section API --markdown-toc false src/index.js","examples:01_minimal":"DIR=01_minimal EXT=js webpack-dev-server","examples:02_typescript":"DIR=02_typescript webpack-dev-server"},"keywords":["react","context","hooks"],"license":"MIT","dependencies":{},"devDependencies":{"@babel/cli":"^7.11.6","@babel/core":"^7.11.6","@babel/preset-env":"^7.11.5","@babel/preset-react":"^7.10.4","@testing-library/react":"^11.0.4","@types/react":"^16.9.49","@types/react-dom":"^16.9.8","@typescript-eslint/eslint-plugin":"^4.3.0","@typescript-eslint/parser":"^4.3.0","babel-loader":"^8.1.0","documentation":"^13.0.2","eslint":"^7.10.0","eslint-config-airbnb":"^18.2.0","eslint-plugin-import":"^2.22.1","eslint-plugin-jsx-a11y":"^6.3.1","eslint-plugin-react":"^7.21.2","eslint-plugin-react-hooks":"^4.1.2","html-webpack-plugin":"^4.5.0","jest":"^26.4.2","microbundle":"^0.12.4","npm-run-all":"^4.1.5","react":"^16.13.1","react-dom":"^16.13.1","scheduler":"^0.19.1","ts-loader":"^8.0.4","typescript":"^4.0.3","webpack":"^4.44.2","webpack-cli":"^3.3.12","webpack-dev-server":"^3.11.0"},"peerDependencies":{"react":">=16.8.0","scheduler":">=0.19.0","react-dom":"*"},"peerDependenciesMeta":{"react-dom":{"optional":true}},"babel":{"presets":[["@babel/preset-env",{"targets":"> 0.2%, not dead"}],"@babel/preset-react"]},"gitHead":"d22abe3e101e719762b5d2248b38a7316de7f3e7","bugs":{"url":"https://github.com/dai-shi/use-context-selector/issues"},"homepage":"https://github.com/dai-shi/use-context-selector#readme","_id":"use-context-selector@1.2.1","_nodeVersion":"12.18.4","_npmVersion":"6.14.6","dist":{"integrity":"sha512-qaZWI3K17jiKrIIQ/klI0UivK+jyESVv/0st2jOgnloRE1cUJmaWoFT3AsB6StiXkQSeMMTnO4ECD2hPf/tguA==","shasum":"4ffcfe058f423da4ecd5fead48a00c9d78ae2fd4","tarball":"https://registry.npmjs.org/use-context-selector/-/use-context-selector-1.2.1.tgz","fileCount":12,"unpackedSize":39197,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfddm/CRA9TVsSAnZWagAA/N0QAKQnQSWGcbT+nV10Qp6z\n45NffKrKyn1jRCOSXQ6V9/xljMgDqnJP9z60pf+ddEnjGOanwmGwfJtoe4Km\nZOU8DdrcfxL5SyFh7GTkWXrjCQDmPa33gfV0dlYnxHXAGsCp8p2Fbq6qryjd\nkvw+Pp1DYBLsoBmPVuAh1YHRm2hkxYQI9Df+ii/pi0gXMEs2JMQT/JT6umwC\nHK5rk9U9hYebAYLdZw2kTtOg2LcDeKHdB0XQ8hLRNIClOtHSOUvS/eDcQWAR\n7QUzDJJEhC+FIDAbJVI5bNZ6bTBTmIb+Q+8KRauyOcCbGi0Yc21KlTBnHarx\nol4khzoeN8q8Aji7KxpRMs9EJ/8p9mOqvXNO6jCAM/db68fmkOiurJeJVxyN\nbPHJ7JAx7fNAzNiGq9MB8F0NGl0rh9VDV6dhe2uQze+4BGtssbZ39gqG7r4e\n+JXbkWKLwjtpqtPfn2sRCf3PZOMDPD0gXBaenWjZIXSUzdfd21LBkZklrKzW\nXHOZelXMRVY7gFF6SVEFNkBexWYXd4+oBCNDYEInRJA+O1R2PSBMxTFyldIt\nggFeqUaoRwzJwH2S6D2DbWFDb0bWUPk6mXJ4TOYEvhhTM5HwXpcE5MEKh99x\nWEBL8Npf/ueH2Pn7HE89UDa70rQ9DqmsO5blm48JmcnFmH1yo5jHwteme7GH\nND5z\r\n=a47b\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQD2g2y+JXIYusxlpgdFlyPKtJadCQKyQtazDy9F+dEkKAIgM0IRg9TVwpFMlR1zpebtWnk3w/byrcPikM1fMlyyrOo="}]},"maintainers":[{"name":"daishi","email":"daishi@axlight.com"}],"_npmUser":{"name":"daishi","email":"daishi@axlight.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/use-context-selector_1.2.1_1601558975072_0.01666266636141711"},"_hasShrinkwrap":false},"1.2.2":{"name":"use-context-selector","description":"React useContextSelector hook in userland","version":"1.2.2","author":{"name":"Daishi Kato"},"repository":{"type":"git","url":"git+https://github.com/dai-shi/use-context-selector.git"},"source":"./src/index.js","main":"./dist/index.umd.js","module":"./dist/index.modern.js","types":"./src/index.d.ts","sideEffects":false,"scripts":{"compile":"microbundle build -f modern,umd","test":"run-s eslint tsc-test jest","eslint":"eslint --ext .js,.ts,.tsx --ignore-pattern dist .","jest":"jest","tsc-test":"tsc --project . --noEmit","apidoc":"documentation readme --section API --markdown-toc false src/index.js","examples:01_minimal":"DIR=01_minimal EXT=js webpack-dev-server","examples:02_typescript":"DIR=02_typescript webpack-dev-server"},"keywords":["react","context","hooks"],"license":"MIT","dependencies":{},"devDependencies":{"@babel/cli":"^7.11.6","@babel/core":"^7.11.6","@babel/preset-env":"^7.11.5","@babel/preset-react":"^7.10.4","@testing-library/react":"^11.0.4","@types/react":"^16.9.49","@types/react-dom":"^16.9.8","@typescript-eslint/eslint-plugin":"^4.3.0","@typescript-eslint/parser":"^4.3.0","babel-loader":"^8.1.0","documentation":"^13.0.2","eslint":"^7.10.0","eslint-config-airbnb":"^18.2.0","eslint-plugin-import":"^2.22.1","eslint-plugin-jsx-a11y":"^6.3.1","eslint-plugin-react":"^7.21.2","eslint-plugin-react-hooks":"^4.1.2","html-webpack-plugin":"^4.5.0","jest":"^26.4.2","microbundle":"^0.12.4","npm-run-all":"^4.1.5","react":"^16.13.1","react-dom":"^16.13.1","scheduler":"^0.19.1","ts-loader":"^8.0.4","typescript":"^4.0.3","webpack":"^4.44.2","webpack-cli":"^3.3.12","webpack-dev-server":"^3.11.0"},"peerDependencies":{"react":">=16.8.0","scheduler":">=0.19.0","react-dom":"*"},"peerDependenciesMeta":{"react-dom":{"optional":true}},"babel":{"presets":[["@babel/preset-env",{"targets":"> 0.2%, not dead"}],"@babel/preset-react"]},"gitHead":"9b2cf9f05251bc6e45d29443879d458e820dad45","bugs":{"url":"https://github.com/dai-shi/use-context-selector/issues"},"homepage":"https://github.com/dai-shi/use-context-selector#readme","_id":"use-context-selector@1.2.2","_nodeVersion":"12.18.4","_npmVersion":"6.14.6","dist":{"integrity":"sha512-1kkfRrlk3ol422nWurgdGq1M2xig4n/cYNd9Xqly1MtrNPiEbxQYLBE1adE5BeGu374pIq0garxtf6/wd1GNbw==","shasum":"b1a7d0899e7ab4391a5a08a3d7ab71f1e27cf5de","tarball":"https://registry.npmjs.org/use-context-selector/-/use-context-selector-1.2.2.tgz","fileCount":12,"unpackedSize":39344,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfdx+QCRA9TVsSAnZWagAAQisP/iSkswbqXj1/x+gRuwx2\nOn609zJRfToTk5361WItMACu8bO7C4cU8i2Y9z6WZ1eQ/rbu4zs2UHnwltFj\nmMuNr69qSvOh6dg57R2DTsDw+tBixBhR+jf2ERmrDad43Qzf0xZ6DChnAo4+\nDpDDaLngG+phnfeS/tH9o1deHI0cMyxtB2WlCvX2TgTs3sMKlNZ731d9zrwi\n3z2upVmCbXREwxbf6MpPkXzr4J9ituQOzQjRo/Ws8zifOw1xCvxqtLwd1Prk\niRQJC+jOYdU4/RLWNLl8vBGMn/RSOV8S/If73szH9qoS1me0x89NY5b9APPO\nOosuPpwlgLksQByM9xdZ899V9YWFifR92aF9GX6R0nr58abK2TFEeadkD8On\nVN83C3o2LVqP+lT/5QTMKqBuJ1e423Kt41iQhY0J322VEEmVpxnMjl62dMRM\nFsOdY2zEeGwylPx/xQ19YnllSfGtczPuH+Pef+QCedzuMnwRIMNW9cFNALew\nBHVY1nSmTchraQaBbS+RNgiG/CwZ2f+9lGB6Qb+/4B2jltAxUPwsDz60QkpF\n9aZ9AHE9ZrfQE0Q+H/8X1qd3sPRfFcxGP2sz+raexla/2IVEZR3L9JFuudeK\n6Ff6OjcUkgxJACd02cwRZcPgZrawNflgDSm07Zki73YwbkN9PhccfDrfmBKE\ngVn9\r\n=5tiO\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQC/F2BLPYlpx8LTShtQDllTBO8s0bdZ5M6s/ovb2hdRTwIhAPaZrhMaXpRWdbqT7HHibHX95GTO+5RRAoZeizTUdudH"}]},"maintainers":[{"name":"daishi","email":"daishi@axlight.com"}],"_npmUser":{"name":"daishi","email":"daishi@axlight.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/use-context-selector_1.2.2_1601642384173_0.5682470661834436"},"_hasShrinkwrap":false},"1.2.3":{"name":"use-context-selector","description":"React useContextSelector hook in userland","version":"1.2.3","author":{"name":"Daishi Kato"},"repository":{"type":"git","url":"git+https://github.com/dai-shi/use-context-selector.git"},"source":"./src/index.js","main":"./dist/index.umd.js","module":"./dist/index.modern.js","types":"./src/index.d.ts","sideEffects":false,"scripts":{"compile":"microbundle build -f modern,umd","test":"run-s eslint tsc-test jest","eslint":"eslint --ext .js,.ts,.tsx --ignore-pattern dist .","jest":"jest","tsc-test":"tsc --project . --noEmit","apidoc":"documentation readme --section API --markdown-toc false src/index.js","examples:01_minimal":"DIR=01_minimal EXT=js webpack-dev-server","examples:02_typescript":"DIR=02_typescript webpack-dev-server"},"keywords":["react","context","hooks"],"license":"MIT","dependencies":{},"devDependencies":{"@babel/cli":"^7.11.6","@babel/core":"^7.11.6","@babel/preset-env":"^7.11.5","@babel/preset-react":"^7.10.4","@testing-library/react":"^11.0.4","@types/react":"^16.9.49","@types/react-dom":"^16.9.8","@typescript-eslint/eslint-plugin":"^4.3.0","@typescript-eslint/parser":"^4.3.0","babel-loader":"^8.1.0","documentation":"^13.0.2","eslint":"^7.10.0","eslint-config-airbnb":"^18.2.0","eslint-plugin-import":"^2.22.1","eslint-plugin-jsx-a11y":"^6.3.1","eslint-plugin-react":"^7.21.2","eslint-plugin-react-hooks":"^4.1.2","html-webpack-plugin":"^4.5.0","jest":"^26.4.2","microbundle":"^0.12.4","npm-run-all":"^4.1.5","react":"^16.13.1","react-dom":"^16.13.1","scheduler":"^0.19.1","ts-loader":"^8.0.4","typescript":"^4.0.3","webpack":"^4.44.2","webpack-cli":"^3.3.12","webpack-dev-server":"^3.11.0"},"peerDependencies":{"react":">=16.8.0","scheduler":">=0.19.0","react-dom":"*"},"peerDependenciesMeta":{"react-dom":{"optional":true}},"babel":{"presets":[["@babel/preset-env",{"targets":"> 0.2%, not dead"}],"@babel/preset-react"]},"gitHead":"6d1ce5c3d71ddee7b235ebb483541347655a03f8","bugs":{"url":"https://github.com/dai-shi/use-context-selector/issues"},"homepage":"https://github.com/dai-shi/use-context-selector#readme","_id":"use-context-selector@1.2.3","_nodeVersion":"12.18.4","_npmVersion":"6.14.6","dist":{"integrity":"sha512-IZuqaT3mxLyDMXbDJQdMqnd6sDI199aQrxfTiz4I8O1vvA5z8valZmtyBLxnM8dOF2hserHdFSza+cjf5gWdyg==","shasum":"f60cc928871c67f5b506f8c12eb94bf46ef11ec2","tarball":"https://registry.npmjs.org/use-context-selector/-/use-context-selector-1.2.3.tgz","fileCount":12,"unpackedSize":39489,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfeDJaCRA9TVsSAnZWagAA2ZAP/1xCsMjs1464sFUxGCVP\nXggge/TIQBc+HFGGQM0qyDKcxReNadlJd+Dh3JyBoSm3yxPnRU6rJA0EOZb0\njEneQfBy10EoVvVXKWc2hGcJY70trXFoEDvIeB/xAyK31cOBeOmOTtv+sXVH\nuPQpKSG64mMQdzEP7V721UO8joadgzIzb6SyVJpSXsK/61ywqDK8ZTHQJIX8\nCo1rCzUi2Zul2heZN1rRye1Klqtw6GFko+SauWq5gJAv/lShaA7fVMAHZ3Wd\naMSa+8GKcGwPA3JrPpHcdXoedtc3AyNCq42t5XixwxdTRjRiWdDrUm8W6BPR\nzF3F0Uq3hs11R81KjiCLWwUvz75KHhtxVBjVPlQoUpnxLc8/2qgzaRSE/QHe\nc1WZBp7B64/tz20851q8MCRSB2x2pBIfz0+d9IbqUjLkhkckgsrnUOVZx/fy\nWEkYTfFp3NKnvRkE3QFZyul5ynLH3wPP1b4PPP+bali459zErsgMAK9MGuc8\nm1HIJN/yTABUCA2k7KaAtbPLlbaokFOoWM0PctP0PXj2mQfVTTAeUL+xkHU3\nLEgI8rOa4+9Kn8pKLndtQUqNOAajKVDAFpXskdc6zbtp4dmFrtxWLC0g1GBw\nR4nmNHN9YE/u74PeP/ME5EpSV/aAPpb3j3tiuy0QHf6Xl2VksglqZzooY5Qi\nVrW0\r\n=aERV\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCDIbYlVtWkZtvLUBS49gjCXtmYCP9zImMytMt2FtTZGQIhANuqKVij6ho8RVnVGLH0Ru7u08zlgZr/U0dO45uA+x9P"}]},"maintainers":[{"name":"daishi","email":"daishi@axlight.com"}],"_npmUser":{"name":"daishi","email":"daishi@axlight.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/use-context-selector_1.2.3_1601712729850_0.5105568565282286"},"_hasShrinkwrap":false},"1.2.4":{"name":"use-context-selector","description":"React useContextSelector hook in userland","version":"1.2.4","author":{"name":"Daishi Kato"},"repository":{"type":"git","url":"git+https://github.com/dai-shi/use-context-selector.git"},"source":"./src/index.js","main":"./dist/index.umd.js","module":"./dist/index.modern.js","types":"./src/index.d.ts","sideEffects":false,"scripts":{"compile":"microbundle build -f modern,umd --external ./batchedUpdates","postcompile":"cp src/batchedUpdates*.js dist","test":"run-s eslint tsc-test jest","eslint":"eslint --ext .js,.ts,.tsx --ignore-pattern dist .","jest":"jest","tsc-test":"tsc --project . --noEmit","apidoc":"documentation readme --section API --markdown-toc false src/index.js","examples:01_minimal":"DIR=01_minimal EXT=js webpack-dev-server","examples:02_typescript":"DIR=02_typescript webpack-dev-server"},"keywords":["react","context","hooks"],"license":"MIT","dependencies":{},"devDependencies":{"@babel/cli":"^7.11.6","@babel/core":"^7.11.6","@babel/preset-env":"^7.11.5","@babel/preset-react":"^7.10.4","@testing-library/react":"^11.0.4","@types/react":"^16.9.49","@types/react-dom":"^16.9.8","@typescript-eslint/eslint-plugin":"^4.3.0","@typescript-eslint/parser":"^4.3.0","babel-loader":"^8.1.0","documentation":"^13.0.2","eslint":"^7.10.0","eslint-config-airbnb":"^18.2.0","eslint-plugin-import":"^2.22.1","eslint-plugin-jsx-a11y":"^6.3.1","eslint-plugin-react":"^7.21.2","eslint-plugin-react-hooks":"^4.1.2","html-webpack-plugin":"^4.5.0","jest":"^26.4.2","microbundle":"^0.12.4","npm-run-all":"^4.1.5","react":"^16.13.1","react-dom":"^16.13.1","scheduler":"^0.19.1","ts-loader":"^8.0.4","typescript":"^4.0.3","webpack":"^4.44.2","webpack-cli":"^3.3.12","webpack-dev-server":"^3.11.0"},"peerDependencies":{"react":">=16.8.0","scheduler":">=0.19.0","react-dom":"*"},"peerDependenciesMeta":{"react-dom":{"optional":true}},"babel":{"presets":[["@babel/preset-env",{"targets":"> 0.2%, not dead"}],"@babel/preset-react"]},"gitHead":"719494d6cda21f2e1fb1cfbb5aff169209058192","bugs":{"url":"https://github.com/dai-shi/use-context-selector/issues"},"homepage":"https://github.com/dai-shi/use-context-selector#readme","_id":"use-context-selector@1.2.4","_nodeVersion":"12.18.4","_npmVersion":"6.14.6","dist":{"integrity":"sha512-3E/wS2SttEENeLWVpyCgWFaByq3x7WGxTLNR+JdqNHaZ0SXwOairkgM9u5d+ON2WgxudnudGXxZg3cfsUhkMgA==","shasum":"7bb0e28baec7b60907264c0a0ec61fafc2f0e3c2","tarball":"https://registry.npmjs.org/use-context-selector/-/use-context-selector-1.2.4.tgz","fileCount":14,"unpackedSize":39852,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfeGoHCRA9TVsSAnZWagAAR4gP/1HPat+nppIx1utIP3Zo\njBnNpYyXdluzeL6pT8ZOcTIeqMoNrFf3G+k6mBQLJzWu+rGbH1fJnya9UeVy\nwvZAxi6HVyar0cwRy21ciN3qLK97lmscUWxDA+551Mscsn3Y1xxrKUUC3ikz\noW/34kzDMWEUfXTFTj/rZ7+5ledFUknuWxFxMhwB3XDG+Io3wCKevzzCss6+\nrj0B9EE3ZhrzahGefsZS4+mjhKAZcgRurN6gflWY3awDHduYWko9Dz8kTgxs\nwALUyEB2UbJEetG3EOaF1XLBBbUQQJduvuzcquah+0LqfPQIzVSIHWsXUuAq\n/N6L4Dwp303lec6hxI/XPiBbNaz7fpoG1JiHhT/lZlencU+SsCA4ehRzB9/b\nG7njSeBpgpPg/u2RGiUICw8qV6EMgcIe+gb0htXm5/IKE7Lc5ABxdfxnb3Lg\n/K9TTpxQGoag3hP8FKIlrkrjL9ukeR8/YAWlBpODIkzYZ1R5qQWAP84oU11v\nkhuiKa4z6xCVCqUQfROPeoDlBKhBiIy4sG1H2WDq0Gb+fh4I4E27/lpkrqfN\nPasrROZzh2Noy9tG17vPoGZmDIpcqOJ5NuKjt5bOr5a0U7UenvrZvyerrwGe\nxksnfcsuIs/mn3wzEy3POC2OBv1kY5sdoT3Oe4Tf6PDt0KT3P+HmsWto55mw\nRrNH\r\n=Xik+\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCyxyWRAj6rfmFxCEvtPBXIm/uzq5WgTG9X0QS0b+oqnAIgREoJFCxjgEe0xwsdhVfr19CJYCZHtUWCIiWODqz9pn4="}]},"maintainers":[{"name":"daishi","email":"daishi@axlight.com"}],"_npmUser":{"name":"daishi","email":"daishi@axlight.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/use-context-selector_1.2.4_1601726983265_0.33387770235411907"},"_hasShrinkwrap":false},"1.2.5":{"name":"use-context-selector","description":"React useContextSelector hook in userland","version":"1.2.5","author":{"name":"Daishi Kato"},"repository":{"type":"git","url":"git+https://github.com/dai-shi/use-context-selector.git"},"source":"./src/index.js","main":"./dist/index.umd.js","module":"./dist/index.modern.js","react-native":"./dist/index.native.modern.js","types":"./src/index.d.ts","sideEffects":false,"scripts":{"compile":"run-s compile:*","compile:dom":"microbundle build -f modern,umd --define REACT_NATIVE=false","compile:native":"microbundle build -f modern,umd -o ./dist/index.native.js --define REACT_NATIVE=true","test":"run-s eslint tsc-test jest","eslint":"eslint --ext .js,.ts,.tsx --ignore-pattern dist .","jest":"jest","tsc-test":"tsc --project . --noEmit","apidoc":"documentation readme --section API --markdown-toc false src/index.js","examples:01_minimal":"DIR=01_minimal EXT=js webpack-dev-server","examples:02_typescript":"DIR=02_typescript webpack-dev-server"},"keywords":["react","context","hooks"],"license":"MIT","dependencies":{},"devDependencies":{"@babel/cli":"^7.11.6","@babel/core":"^7.11.6","@babel/preset-env":"^7.11.5","@babel/preset-react":"^7.10.4","@testing-library/react":"^11.0.4","@types/react":"^16.9.49","@types/react-dom":"^16.9.8","@typescript-eslint/eslint-plugin":"^4.3.0","@typescript-eslint/parser":"^4.3.0","babel-loader":"^8.1.0","documentation":"^13.0.2","eslint":"^7.10.0","eslint-config-airbnb":"^18.2.0","eslint-plugin-import":"^2.22.1","eslint-plugin-jsx-a11y":"^6.3.1","eslint-plugin-react":"^7.21.2","eslint-plugin-react-hooks":"^4.1.2","html-webpack-plugin":"^4.5.0","jest":"^26.4.2","microbundle":"^0.12.4","npm-run-all":"^4.1.5","react":"^16.13.1","react-dom":"^16.13.1","scheduler":"^0.19.1","ts-loader":"^8.0.4","typescript":"^4.0.3","webpack":"^4.44.2","webpack-cli":"^3.3.12","webpack-dev-server":"^3.11.0"},"peerDependencies":{"react":">=16.8.0","scheduler":">=0.19.0","react-dom":"*"},"peerDependenciesMeta":{"react-dom":{"optional":true}},"jest":{"globals":{"REACT_NATIVE":false}},"babel":{"presets":[["@babel/preset-env",{"targets":"> 0.2%, not dead"}],"@babel/preset-react"]},"gitHead":"f0001c053c9e6818c98cd527a2b9993513a02099","bugs":{"url":"https://github.com/dai-shi/use-context-selector/issues"},"homepage":"https://github.com/dai-shi/use-context-selector#readme","_id":"use-context-selector@1.2.5","_nodeVersion":"12.18.4","_npmVersion":"6.14.6","dist":{"integrity":"sha512-Xh1wpqbtzQEBTLblWQjvvBHW2BPKDrexBDh0WsIWtJRqgM/5uBfmRnmt2nMQUYWlTQdMMsLeAwjrQ+zL8ZWabg==","shasum":"40f84a9625508e89e4bb819aae2a9f04769ecfab","tarball":"https://registry.npmjs.org/use-context-selector/-/use-context-selector-1.2.5.tgz","fileCount":15,"unpackedSize":63517,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfeHcdCRA9TVsSAnZWagAA8SIQAJcfHQqxrej2OV8yXe0x\nz2uQS67rTPCc7EN+eVfSeZyytZnMta5Txho6usKe7cgXZWh2hQ+jwOVlNhAu\ncwWTTOaFGTrQwpeY4RYUhN/Bf5efaNA1mDbpGAUsbjL+Ad+5tv4J/ei2Ymhv\nPVqYLqAEIkZsfWiw2VgfAovXHoI6J86j1/CiCPst7pkM/BuZ3HX7QkVfNaDO\naUFC5ThhufOqmTGrr4TqJ5P42UOjlPD9d3Zo0A40Sn0XVbuKQnFezDBPY+aN\ntjVw6z4GGd+klyccZ7EYB4i1sKum6PqEHHdqvE9nQFGH2KKtx7b5O2IjZ9mM\nCGHsidlkDydAHVrA/kyYbmPyqZzUfhez+OO3lNNpbu2KJJ1Fu2t9/+TsMOFy\nOcNQ0YkA251VAgL/CmaVejiZ5eG+PjKIdpCxnpHffGmaqTzRi1tZe0WkzFBp\nw6vwe83vibNGs5tN86S59c0t958013tQKW0tyeuZhNNJw+1yO5estGFP8kkO\nsOesH/Q2zKyHUY8KgEmLYxDr4+JLLAditVgm48KrUDVQDhogX6gmPy8we/BF\nfvGPqOxqfezoL7PGA07Da5XH/e+3j2EYJ74HpepGfPNdKW/WskGW84bkpIVb\nM92Scj7PpoIfv1nl1GWTo8/tAsWHFU9HuUaMXBl7qUk66MkAtkGSic9cT5Fq\nDOUU\r\n=vM0V\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIGGH5J6Ca5KIsVXY5J5H5jF7miwC+YBZ7whFVKCcPrm1AiBD7BlJp1dOzQcsI3o/g7HoJZYOJ241Sc6iw5U7ZP8TmQ=="}]},"maintainers":[{"name":"daishi","email":"daishi@axlight.com"}],"_npmUser":{"name":"daishi","email":"daishi@axlight.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/use-context-selector_1.2.5_1601730333248_0.5151694171211487"},"_hasShrinkwrap":false},"1.2.6":{"name":"use-context-selector","description":"React useContextSelector hook in userland","version":"1.2.6","author":{"name":"Daishi Kato"},"repository":{"type":"git","url":"git+https://github.com/dai-shi/use-context-selector.git"},"source":"./src/index.js","main":"./dist/index.umd.js","module":"./dist/index.modern.js","react-native":"./dist/index.native.modern.js","types":"./src/index.d.ts","sideEffects":false,"scripts":{"compile":"run-s compile:*","compile:dom":"microbundle build -f modern,umd --define REACT_NATIVE=false","compile:native":"microbundle build -f modern,umd -o ./dist/index.native.js --define REACT_NATIVE=true","test":"run-s eslint tsc-test jest","eslint":"eslint --ext .js,.ts,.tsx --ignore-pattern dist .","jest":"jest","tsc-test":"tsc --project . --noEmit","apidoc":"documentation readme --section API --markdown-toc false src/index.js","examples:01_minimal":"DIR=01_minimal EXT=js webpack-dev-server","examples:02_typescript":"DIR=02_typescript webpack-dev-server"},"keywords":["react","context","hooks"],"license":"MIT","dependencies":{},"devDependencies":{"@babel/cli":"^7.11.6","@babel/core":"^7.11.6","@babel/preset-env":"^7.11.5","@babel/preset-react":"^7.10.4","@testing-library/react":"^11.0.4","@types/react":"^16.9.49","@types/react-dom":"^16.9.8","@typescript-eslint/eslint-plugin":"^4.3.0","@typescript-eslint/parser":"^4.3.0","babel-loader":"^8.1.0","documentation":"^13.0.2","eslint":"^7.10.0","eslint-config-airbnb":"^18.2.0","eslint-plugin-import":"^2.22.1","eslint-plugin-jsx-a11y":"^6.3.1","eslint-plugin-react":"^7.21.2","eslint-plugin-react-hooks":"^4.1.2","html-webpack-plugin":"^4.5.0","jest":"^26.4.2","microbundle":"^0.12.4","npm-run-all":"^4.1.5","react":"^16.13.1","react-dom":"^16.13.1","scheduler":"^0.19.1","ts-loader":"^8.0.4","typescript":"^4.0.3","webpack":"^4.44.2","webpack-cli":"^3.3.12","webpack-dev-server":"^3.11.0"},"peerDependencies":{"react":">=16.8.0","scheduler":">=0.19.0","react-dom":"*"},"peerDependenciesMeta":{"react-dom":{"optional":true}},"jest":{"globals":{"REACT_NATIVE":false}},"babel":{"presets":[["@babel/preset-env",{"targets":"> 0.2%, not dead"}],"@babel/preset-react"]},"gitHead":"cbfb3333a53e146390cd78aff3b5b753a69cc2e5","bugs":{"url":"https://github.com/dai-shi/use-context-selector/issues"},"homepage":"https://github.com/dai-shi/use-context-selector#readme","_id":"use-context-selector@1.2.6","_nodeVersion":"12.18.4","_npmVersion":"6.14.6","dist":{"integrity":"sha512-4w3ie2KwLD9ealWPssvSCK+kuEN5kmAhR147cNMKWhMcNsXlrc1xgdgiynOmQXwvBn7fowTBF65ZS8T9b5Y20w==","shasum":"c2927dcba287a232074846895d441d75c0506368","tarball":"https://registry.npmjs.org/use-context-selector/-/use-context-selector-1.2.6.tgz","fileCount":15,"unpackedSize":66927,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJffj8HCRA9TVsSAnZWagAAhDQQAJ1na19989PUWognTYjV\nJiQ55B0vxRUWV4mlMHjfjm1oP4miyVA95GJ35rw3fTFxVUiOaFs+8iw60y+w\n+R4gx1P3ANLgBAf+C/5TnjlarlLshUFGxiogB6CtON+/697OlA33qlSGobkE\ngx/U9EC01N/FWYI5KqJ9Zq3b66KuXEi3axFt3wCM0r7t3KhIHijs5P9SbmIM\naJaGmD0G4j0m4vHJuuytoYpwT/p4bh8Fr+EW3VHwPEpDUGI4Rso0AAo4cXfC\njoaLVTnoFTAmHDm7XmuJDAD/LZOZD08I65wffh7GomIiz8yTNnSW6tm1wtWx\nV5ffxNqSAH9dopAC0eFBHaOwewpz9jHAAiSIzesI5Sfo/F59FpLVhMG+u2Xu\nQot2RI8ThPNXzhqbPMJSLWgdc/Yv3ZPiyYsllqu81gUGOBktf60HkBJ/B0kA\nY7zDCwh9SHKwriGMi7NnM8D3lVM5pc3QlCzzcMcwdqXGYzpkGWYG9RzRDIsP\nopr/BzZD3BjjWzHWKSeFHy2lvRm5Ko7LZe90gd0U0cFxicFQ7a4qiJM+AD6f\nzc9bbXc7hqEwDMejOEKVSjFtgyzBkgH454WqhbVXZewi3rVec9SN+hh5gexx\nD9r+TKQfsi2jK0lE/ow5e7BcXWb02r58ShGKvKa0OSvMgPBP2YHVAv/NeqAk\nPXW4\r\n=9f3C\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCMN4vD7aJn4bVVI88+nX2KlU/keKa5Z2SEFMsGZ1SnsgIhAJyhdI1dHVr6eXTrAFfkKWrddxJFZbfEkEWQ+9AKE/TI"}]},"maintainers":[{"name":"daishi","email":"daishi@axlight.com"}],"_npmUser":{"name":"daishi","email":"daishi@axlight.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/use-context-selector_1.2.6_1602109191117_0.844476212954993"},"_hasShrinkwrap":false},"1.2.7":{"name":"use-context-selector","description":"React useContextSelector hook in userland","version":"1.2.7","author":{"name":"Daishi Kato"},"repository":{"type":"git","url":"git+https://github.com/dai-shi/use-context-selector.git"},"source":"./src/index.js","main":"./dist/index.umd.js","module":"./dist/index.modern.js","react-native":"./dist/index.native.modern.js","types":"./src/index.d.ts","sideEffects":false,"scripts":{"compile":"run-s compile:*","compile:dom":"microbundle build -f modern,umd --define REACT_NATIVE=false","compile:native":"microbundle build -f modern,umd -o ./dist/index.native.js --define REACT_NATIVE=true","test":"run-s eslint tsc-test jest","eslint":"eslint --ext .js,.ts,.tsx --ignore-pattern dist .","jest":"jest","tsc-test":"tsc --project . --noEmit","apidoc":"documentation readme --section API --markdown-toc false src/index.js","examples:01_minimal":"DIR=01_minimal EXT=js webpack-dev-server","examples:02_typescript":"DIR=02_typescript webpack-dev-server"},"keywords":["react","context","hooks"],"license":"MIT","dependencies":{},"devDependencies":{"@babel/cli":"^7.11.6","@babel/core":"^7.11.6","@babel/preset-env":"^7.11.5","@babel/preset-react":"^7.10.4","@testing-library/react":"^11.0.4","@types/react":"^16.9.49","@types/react-dom":"^16.9.8","@typescript-eslint/eslint-plugin":"^4.3.0","@typescript-eslint/parser":"^4.3.0","babel-loader":"^8.1.0","documentation":"^13.0.2","eslint":"^7.10.0","eslint-config-airbnb":"^18.2.0","eslint-plugin-import":"^2.22.1","eslint-plugin-jsx-a11y":"^6.3.1","eslint-plugin-react":"^7.21.2","eslint-plugin-react-hooks":"^4.1.2","html-webpack-plugin":"^4.5.0","jest":"^26.4.2","microbundle":"^0.12.4","npm-run-all":"^4.1.5","react":"^16.13.1","react-dom":"^16.13.1","scheduler":"^0.19.1","ts-loader":"^8.0.4","typescript":"^4.0.3","webpack":"^4.44.2","webpack-cli":"^3.3.12","webpack-dev-server":"^3.11.0"},"peerDependencies":{"react":">=16.8.0","scheduler":">=0.19.0","react-dom":"*"},"peerDependenciesMeta":{"react-dom":{"optional":true}},"jest":{"globals":{"REACT_NATIVE":false}},"babel":{"presets":[["@babel/preset-env",{"targets":"> 0.2%, not dead"}],"@babel/preset-react"]},"gitHead":"1e8f7db6c4eb1d37923a2083268bc48af1ae8869","bugs":{"url":"https://github.com/dai-shi/use-context-selector/issues"},"homepage":"https://github.com/dai-shi/use-context-selector#readme","_id":"use-context-selector@1.2.7","_nodeVersion":"12.18.4","_npmVersion":"6.14.6","dist":{"integrity":"sha512-xuoTA6eyE5+f6NEN2IgwDw5jPNDqUextgUHueWc3bi8oX1cKfnQexRfl4D/60Foqrg+o4UH1zv71Oy/zOaVRyQ==","shasum":"94311ec8f1f05b27ffe089bf1372910dbf910f8b","tarball":"https://registry.npmjs.org/use-context-selector/-/use-context-selector-1.2.7.tgz","fileCount":15,"unpackedSize":67070,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJffkVkCRA9TVsSAnZWagAAHPkQAIcx6XOUfLAxbIvtfjh6\n95C2ng2m51d+cteRBdCCYsMiIkpB4xoYhAgutUVZED5nvZbTAAL0ZLS2CZgu\nkj4Gy77ANRrQ9ZNwGIEnrGyfdp755VEf3JQYpHTpEk3aqdpioIXgkOuhfJy4\nndBM7q2xewJnzwq0oe2D9anAohmR3AGHoxFV/UAp4h7TaKY/uv9CTigktUpb\nHYabBMAXWJW+JghLnoqBuErma8ygzohLwWFIIfQP3fT4XH5BUC2zV10Ach0f\nLf77X6iInKr8Ek1FwakuMr9eXxFKtp2vEoZmMo72OuxB2zWp4cNBZ5fHchaI\nS+cHA6yGXrkGSiRxUdcy4HOMsdYCPqJOc5jdvhtqm3PakQnH8wgXDmff0N4h\n/2FMPxJN1+0llPC9meQXeVsJzHdqOCk2X9tbQPh5DfdsdYAMExh/q0lm4orU\nr7nfm9/A6+Z3lfqsU39zvLFsXhNy5hgwWdepTHO28n+4iKVpH7mAayXRZ/eT\naVBBSG1Dbuw8UhHTj+UBLzGWzviXxR+kVUtasmsDKieYl9NpYbqpgMPxTsV4\nLUUe7OI3cOXhBUzNUFx2CrS9PaIiv8Figo1g+MvTcMPPpIh97kGgIdnDcLh1\njXi9Dc1JZJkohIQz9WxS9G0eDWwVM53PJEjj1R7GP5zI9G6NidX/o5I6/Dxj\nA6a0\r\n=Ef2r\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICSbZs7NTd1MILhNYmvFsRITBTQnFeMFpSnVzJHsd53oAiBn6/vh0ElzWpmCC5+wJPT0iKF60nOG893pLn5Gu8ro7Q=="}]},"maintainers":[{"name":"daishi","email":"daishi@axlight.com"}],"_npmUser":{"name":"daishi","email":"daishi@axlight.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/use-context-selector_1.2.7_1602110819514_0.7091682825283774"},"_hasShrinkwrap":false},"1.2.8":{"name":"use-context-selector","description":"React useContextSelector hook in userland","version":"1.2.8","author":{"name":"Daishi Kato"},"repository":{"type":"git","url":"git+https://github.com/dai-shi/use-context-selector.git"},"source":"./src/index.js","main":"./dist/index.umd.js","module":"./dist/index.modern.js","react-native":"./dist/index.native.modern.js","types":"./src/index.d.ts","sideEffects":false,"scripts":{"compile":"run-s compile:*","compile:dom":"microbundle build -f modern,umd --define REACT_NATIVE=false","compile:native":"microbundle build -f modern,umd -o ./dist/index.native.js --define REACT_NATIVE=true","test":"run-s eslint tsc-test jest","eslint":"eslint --ext .js,.ts,.tsx --ignore-pattern dist .","jest":"jest","tsc-test":"tsc --project . --noEmit","apidoc":"documentation readme --section API --markdown-toc false src/index.js","examples:01_minimal":"DIR=01_minimal EXT=js webpack-dev-server","examples:02_typescript":"DIR=02_typescript webpack-dev-server"},"keywords":["react","context","hooks"],"license":"MIT","dependencies":{},"devDependencies":{"@babel/cli":"^7.11.6","@babel/core":"^7.11.6","@babel/preset-env":"^7.11.5","@babel/preset-react":"^7.10.4","@testing-library/react":"^11.0.4","@types/react":"^16.9.49","@types/react-dom":"^16.9.8","@typescript-eslint/eslint-plugin":"^4.3.0","@typescript-eslint/parser":"^4.3.0","babel-loader":"^8.1.0","documentation":"^13.0.2","eslint":"^7.10.0","eslint-config-airbnb":"^18.2.0","eslint-plugin-import":"^2.22.1","eslint-plugin-jsx-a11y":"^6.3.1","eslint-plugin-react":"^7.21.2","eslint-plugin-react-hooks":"^4.1.2","html-webpack-plugin":"^4.5.0","jest":"^26.4.2","microbundle":"^0.12.4","npm-run-all":"^4.1.5","react":"^16.13.1","react-dom":"^16.13.1","scheduler":"^0.19.1","ts-loader":"^8.0.4","typescript":"^4.0.3","webpack":"^4.44.2","webpack-cli":"^3.3.12","webpack-dev-server":"^3.11.0"},"peerDependencies":{"react":">=16.8.0","scheduler":">=0.19.0","react-dom":"*"},"peerDependenciesMeta":{"react-dom":{"optional":true}},"jest":{"globals":{"REACT_NATIVE":false}},"babel":{"presets":[["@babel/preset-env",{"targets":"> 0.2%, not dead"}],"@babel/preset-react"]},"gitHead":"dbeba48c48402c58ee861c2d8e8ea03bde7b4e7a","bugs":{"url":"https://github.com/dai-shi/use-context-selector/issues"},"homepage":"https://github.com/dai-shi/use-context-selector#readme","_id":"use-context-selector@1.2.8","_nodeVersion":"12.18.4","_npmVersion":"6.14.6","dist":{"integrity":"sha512-mQlgVKbX3Dkiq+lS0JsavhyrPpCJ9njDlScNZZJA8nC7QlyimEOnbbQ7wxvyqkHH8GNrRMXGyGHqkYy2bLnKww==","shasum":"f505a490a95afb3c96b3f7d262c973a0ef3b19bc","tarball":"https://registry.npmjs.org/use-context-selector/-/use-context-selector-1.2.8.tgz","fileCount":15,"unpackedSize":69933,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfftbOCRA9TVsSAnZWagAAXuEP/AhFe0CyC49zbjQ80gXU\n6AJavkKmEEBpgKH9gmlQgR0A3wTEjDf++ZaXt4JvYHgdOhCCkwfMCBdZ49kP\nidp8EnL8g7yqyRucHOXZE2BclLJdk4nJm/Qha2962YVdsE+igff0S/t5ERRi\nzn8Q1MDupv98qA66Xv56BNg8nLIAFy9CuJ960gBVrOJf+RO2GKJfZdnrBHgy\nuAo53iN2F7TOkzU5qUsc4ZpwKsUM8KM56WJeWS9578TuCYwoFEB+F31K+2Ki\ngRQ3xSE2tU90UR2I5xbNFnHNDzGe1RfUIhEQNN1zvSLblcKGBhISG1D2YJV3\nNO1qtf0eDVdNnKW/oxVNRwBtc2q4ORt4Kk3pbj+Y6bpvkRmE9cs5Zg2AJ9f7\n+hAks2OcA1aTMgs5Svd4xYiBaUihpCVp0Rba0Q4jnnEUGPpWePAbcvDwLEhr\nKzwLS7ipMVdUvlidGjIcTg3Ng8LsWwaX89PeFVjekkJQHzXYzrQWowixa1Qd\nMrz6lb1Aj+VXD44VtTfT4Lti31MERu+Gub8bPxGNqmVTmV9SHW5NkapqqDHF\nKIHWUorN1dyn4K9r6u5Cj30P/UofCab2M3N9hajJ0mtxG3I1lLPFYYd7dHLM\nIb95psIDz5atS9ZqGLRf4vY00XT8iyz5TgEzC49Ibfun9sfGDtoeot4coOIn\nLizy\r\n=/SqK\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDO0netmaNA6GIwOaqJ4yQClgcNcl1HP5yKJ0WKhPj6cwIhAJvkSAtm23ZYBBrSAj1tk5+YVqWCoJvSVIkVqLuhczQa"}]},"maintainers":[{"name":"daishi","email":"daishi@axlight.com"}],"_npmUser":{"name":"daishi","email":"daishi@axlight.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/use-context-selector_1.2.8_1602148045993_0.34998740354405755"},"_hasShrinkwrap":false},"1.2.9":{"name":"use-context-selector","description":"React useContextSelector hook in userland","version":"1.2.9","author":{"name":"Daishi Kato"},"repository":{"type":"git","url":"git+https://github.com/dai-shi/use-context-selector.git"},"source":"./src/index.js","main":"./dist/index.umd.js","module":"./dist/index.modern.js","react-native":"./dist/index.native.modern.js","types":"./src/index.d.ts","sideEffects":false,"scripts":{"compile":"run-s compile:*","compile:dom":"microbundle build -f modern,umd","precompile:native":"mkdir src/native && cp src/index.js src/native/index.js && cp src/batchedUpdates.native.js src/native/batchedUpdates.js","compile:native":"microbundle build -f modern,umd -i ./src/native/index.js -o ./dist/index.native.js","postcompile:native":"rm -r src/native","test":"run-s eslint tsc-test jest","eslint":"eslint --ext .js,.ts,.tsx --ignore-pattern dist .","jest":"jest","tsc-test":"tsc --project . --noEmit","apidoc":"documentation readme --section API --markdown-toc false src/index.js","examples:01_minimal":"DIR=01_minimal EXT=js webpack-dev-server","examples:02_typescript":"DIR=02_typescript webpack-dev-server"},"keywords":["react","context","hooks"],"license":"MIT","dependencies":{},"devDependencies":{"@babel/cli":"^7.11.6","@babel/core":"^7.11.6","@babel/preset-env":"^7.11.5","@babel/preset-react":"^7.10.4","@testing-library/react":"^11.0.4","@types/react":"^16.9.49","@types/react-dom":"^16.9.8","@typescript-eslint/eslint-plugin":"^4.3.0","@typescript-eslint/parser":"^4.3.0","babel-loader":"^8.1.0","documentation":"^13.0.2","eslint":"^7.10.0","eslint-config-airbnb":"^18.2.0","eslint-plugin-import":"^2.22.1","eslint-plugin-jsx-a11y":"^6.3.1","eslint-plugin-react":"^7.21.2","eslint-plugin-react-hooks":"^4.1.2","html-webpack-plugin":"^4.5.0","jest":"^26.4.2","microbundle":"^0.12.4","npm-run-all":"^4.1.5","react":"^16.13.1","react-dom":"^16.13.1","scheduler":"^0.19.1","ts-loader":"^8.0.4","typescript":"^4.0.3","webpack":"^4.44.2","webpack-cli":"^3.3.12","webpack-dev-server":"^3.11.0"},"peerDependencies":{"react":">=16.8.0","scheduler":">=0.19.0","react-dom":"*"},"peerDependenciesMeta":{"react-dom":{"optional":true}},"babel":{"presets":[["@babel/preset-env",{"targets":"> 0.2%, not dead"}],"@babel/preset-react"]},"gitHead":"a395d3dee628c432896466ff2fa7c6f0ae0ceb3e","bugs":{"url":"https://github.com/dai-shi/use-context-selector/issues"},"homepage":"https://github.com/dai-shi/use-context-selector#readme","_id":"use-context-selector@1.2.9","_nodeVersion":"12.19.0","_npmVersion":"6.14.8","dist":{"integrity":"sha512-0XXsdRC2REJYe3HYgYb4SwAOA/CXucMoxCcEoMA9VnPkrVTwEK9WmTxrEtTDXi2Lypx6E//ZyEkluRvRwoxOdw==","shasum":"da79747c0788db50dfbcb5e6f46b245e077f1b55","tarball":"https://registry.npmjs.org/use-context-selector/-/use-context-selector-1.2.9.tgz","fileCount":16,"unpackedSize":68715,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfiZSYCRA9TVsSAnZWagAAgmwQAI/iYpQIRPyfLove7yIT\nj0n8Ph2aGn33dC9QWO/uzTxQm+t5GG9ZBDYVid0EtZM4JlA98aaDP2iLzWvS\nQkJPTfDY1wMApE/Pt7G2K2MGCIpgbIGOea/5nahJ8S86/4xTWlAA+wCqd61S\nb9aHNaIVoxaOnFwa9DAD/4/fCFvJU1H+J+0Emk09lynzp/g62/4c7Xn9WkjK\nxN2CHcHuv9XaX1YRUmP7kNJCJjn/rtbqKahKWtq6ftIRJ9RBZAxCWAnkJkyD\ne1sIsyb/8rqIYrTkeW9I0FtaUH0MUGfr0rJxH74WMiNL5b60+UnwyIhzZM48\n6ZGuUIuAveij5d79jUifAzFccPrRHnPHYk6N++VXXcb/85WhELnK0ZiOFVAi\nCDXneCECQ9pA8vMX1goO6Jp/z41vJAZYbQPT+QpvmOA2riMAQVxG37WX3Gyy\n3q1sSfKh4ONEBZOI63F05D8RQLuhUqKWmHIftdZseHmK9rRScNH/k5Rb6sI4\nS5b/SNFWObTehcc42qeZM3SEZbyWanFjpkEFYZqsyhGEYJs8sqZL6GfhrBSe\n5/Rh1r9bbJ8lH/kDASHWfAoLeB+PrNXDTESSCchxVzDmUZtJuIFlanmm08xF\nJLEznbZit4MFAwTrX6bhSAa1OoJAHGVUnxIh+vuCZq9qfeaQ4TiZTpsxN0rf\nMD24\r\n=uOa1\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIE03GpRkZZw8IR8VWjgpPCXsN0/HXNJUcZfRwDZTNz1wAiBdJKT6XBndFxDXtV3cc/zUgb17p3gUc/DnWOO/LROxJA=="}]},"maintainers":[{"name":"daishi","email":"daishi@axlight.com"}],"_npmUser":{"name":"daishi","email":"daishi@axlight.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/use-context-selector_1.2.9_1602851991985_0.40132059556112676"},"_hasShrinkwrap":false},"1.2.10":{"name":"use-context-selector","description":"React useContextSelector hook in userland","version":"1.2.10","author":{"name":"Daishi Kato"},"repository":{"type":"git","url":"git+https://github.com/dai-shi/use-context-selector.git"},"source":"./src/index.js","main":"./dist/index.umd.js","module":"./dist/index.modern.js","react-native":"./dist/index.native.modern.js","types":"./src/index.d.ts","sideEffects":false,"scripts":{"compile":"run-s compile:*","compile:dom":"microbundle build -f modern,umd","precompile:native":"mkdir src/native && cp src/index.js src/native/index.js && cp src/batchedUpdates.native.js src/native/batchedUpdates.js","compile:native":"microbundle build -f modern,umd -i ./src/native/index.js -o ./dist/index.native.js","postcompile:native":"rm -r src/native","test":"run-s eslint tsc-test jest","eslint":"eslint --ext .js,.ts,.tsx --ignore-pattern dist .","jest":"jest","tsc-test":"tsc --project . --noEmit","apidoc":"documentation readme --section API --markdown-toc false src/index.js","examples:01_minimal":"DIR=01_minimal EXT=js webpack-dev-server","examples:02_typescript":"DIR=02_typescript webpack-dev-server"},"keywords":["react","context","hooks"],"license":"MIT","dependencies":{},"devDependencies":{"@babel/cli":"^7.11.6","@babel/core":"^7.11.6","@babel/preset-env":"^7.11.5","@babel/preset-react":"^7.10.4","@testing-library/react":"^11.0.4","@types/react":"^16.9.49","@types/react-dom":"^16.9.8","@typescript-eslint/eslint-plugin":"^4.3.0","@typescript-eslint/parser":"^4.3.0","babel-loader":"^8.1.0","documentation":"^13.0.2","eslint":"^7.10.0","eslint-config-airbnb":"^18.2.0","eslint-plugin-import":"^2.22.1","eslint-plugin-jsx-a11y":"^6.3.1","eslint-plugin-react":"^7.21.2","eslint-plugin-react-hooks":"^4.1.2","html-webpack-plugin":"^4.5.0","jest":"^26.4.2","microbundle":"^0.12.4","npm-run-all":"^4.1.5","react":"^16.13.1","react-dom":"^16.13.1","scheduler":"^0.19.1","ts-loader":"^8.0.4","typescript":"^4.0.3","webpack":"^4.44.2","webpack-cli":"^3.3.12","webpack-dev-server":"^3.11.0"},"peerDependencies":{"react":">=16.8.0","scheduler":">=0.19.0","react-dom":"*","react-native":"*"},"peerDependenciesMeta":{"react-dom":{"optional":true},"react-native":{"optional":true}},"babel":{"presets":[["@babel/preset-env",{"targets":"> 0.2%, not dead"}],"@babel/preset-react"]},"gitHead":"a91d20053d82b3d4b8a898a5edf9fe90c3599cf1","bugs":{"url":"https://github.com/dai-shi/use-context-selector/issues"},"homepage":"https://github.com/dai-shi/use-context-selector#readme","_id":"use-context-selector@1.2.10","_nodeVersion":"12.19.0","_npmVersion":"6.14.8","dist":{"integrity":"sha512-gSKcvwl2I683GY5JG/ixsVDeVsIdEdLJz3ccl7y1KaKJqXitX2PjC0Z1F0LEtni1pc7u1J3cy5dHT8+MI69naA==","shasum":"47230099cd381119ae1c0f4a44737f336932aec0","tarball":"https://registry.npmjs.org/use-context-selector/-/use-context-selector-1.2.10.tgz","fileCount":16,"unpackedSize":68866,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfis5PCRA9TVsSAnZWagAAb2oP/RlF3XFTR5+snLBQTez2\nMvXlbxzcYKdqQniB3+zp3rrKRMI9cS9z+kYA/V7PVAdXl2w5DBqajLYXsyhm\n492kMqUhl9Co6Y4fIqflfuJYs4BKDtQm2nC/BdovSlYdm2CQuGAZXBpMnzBz\naVDBReKnLckOs4FlbgZ4VIw2FVwTHCsCmaguE7vs+sUGMQcJjKMRQH/+vOkV\nC61biQsFnkL1FIYZ7X7fvh5c27KOMNB0Yzmr+SEXANxFQgXrnk6jgxaiOFP9\nZAbK6JJN7VxODpnov4LtfNDC5dLEr6/003zRF23Px1k7mG1xhbwLI2hI2q4B\ntBSkH3yjQIGE4kbDoQQMELLiWEwNJIATjO1Ft7CUACm6dSMBXTpF+r/sXfvE\nraDABvmAe9laaS4MU3s8YVHHgY7htLhGllgEEB9DFecPWhDEaFiGu0d0hfyc\nMD0fc9jgPXxZ64Wv4iKzrwy5mbPhqdQNsUTaCbZW2jndmfIjIRDINjf2VPVC\nDzFpaO70MHPOXYW3BtSCZKdcrNV/+Es/7TNobF9FVNR5jE3aykCQrBhgeKUX\n0wQFM03i7cvyjZF9cfRPqEd0ixVbyPVgZ+PFtSQ/TuwxKhBgbSesBSrAAgiP\nx8oFZkyjiO1GIbG/IBKVOdz0+5aJcNbCdrX75aOVJYB5z0Qf70FZo0SGsNg4\n/7oH\r\n=WKvG\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCT1Yx0oAu3DfqvDgL4gfFmDSeFkFa+mNPv8TjgHKto5QIhAJj3npFtA3Y0Py1CVSiO+3vdOYf8XQaJNb4jGDdO6UNg"}]},"maintainers":[{"name":"daishi","email":"daishi@axlight.com"}],"_npmUser":{"name":"daishi","email":"daishi@axlight.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/use-context-selector_1.2.10_1602932302751_0.10687807315054476"},"_hasShrinkwrap":false},"1.2.11":{"name":"use-context-selector","description":"React useContextSelector hook in userland","version":"1.2.11","author":{"name":"Daishi Kato"},"repository":{"type":"git","url":"git+https://github.com/dai-shi/use-context-selector.git"},"source":"./src/index.js","main":"./dist/index.umd.js","module":"./dist/index.modern.js","react-native":"./dist/index.native.modern.js","types":"./src/index.d.ts","sideEffects":false,"scripts":{"compile":"run-s compile:*","compile:dom":"microbundle build -f modern,umd","precompile:native":"mkdir src/native && cp src/index.js src/native/index.js && cp src/batchedUpdates.native.js src/native/batchedUpdates.js","compile:native":"microbundle build -f modern,umd -i ./src/native/index.js -o ./dist/index.native.js","postcompile:native":"rm -r src/native","test":"run-s eslint tsc-test jest","eslint":"eslint --ext .js,.ts,.tsx --ignore-pattern dist .","jest":"jest","tsc-test":"tsc --project . --noEmit","apidoc":"documentation readme --section API --markdown-toc false src/index.js","examples:01_minimal":"DIR=01_minimal EXT=js webpack-dev-server","examples:02_typescript":"DIR=02_typescript webpack-dev-server"},"keywords":["react","context","hooks"],"license":"MIT","dependencies":{},"devDependencies":{"@babel/cli":"^7.12.1","@babel/core":"^7.12.3","@babel/preset-env":"^7.12.1","@babel/preset-react":"^7.12.5","@testing-library/react":"^11.1.1","@types/react":"^16.9.56","@types/react-dom":"^16.9.9","@typescript-eslint/eslint-plugin":"^4.6.1","@typescript-eslint/parser":"^4.6.1","babel-loader":"^8.1.0","documentation":"^13.1.0","eslint":"^7.13.0","eslint-config-airbnb":"^18.2.1","eslint-plugin-import":"^2.22.1","eslint-plugin-jsx-a11y":"^6.4.1","eslint-plugin-react":"^7.21.5","eslint-plugin-react-hooks":"^4.2.0","html-webpack-plugin":"^4.5.0","jest":"^26.6.3","microbundle":"^0.12.4","npm-run-all":"^4.1.5","react":"^17.0.1","react-dom":"^17.0.1","scheduler":"^0.19.1","ts-loader":"^8.0.10","typescript":"^4.0.5","webpack":"^4.44.2","webpack-cli":"^3.3.12","webpack-dev-server":"^3.11.0"},"peerDependencies":{"react":">=16.8.0","scheduler":">=0.19.0","react-dom":"*","react-native":"*"},"peerDependenciesMeta":{"react-dom":{"optional":true},"react-native":{"optional":true}},"babel":{"presets":[["@babel/preset-env",{"targets":"> 0.2%, not dead"}],"@babel/preset-react"]},"gitHead":"42623d3cddd8016669a794ce3df0288f8294e427","bugs":{"url":"https://github.com/dai-shi/use-context-selector/issues"},"homepage":"https://github.com/dai-shi/use-context-selector#readme","_id":"use-context-selector@1.2.11","_nodeVersion":"12.19.0","_npmVersion":"6.14.8","dist":{"integrity":"sha512-roElSNplrQSxUV3dM4ouCVC8xnLAIvh4ulF16Wgsyb+b7Gd23rUughZKkL0DvH48FI4mewwmwqVCU+z5PUEfAg==","shasum":"2b7dd6ed045e4594c1936134f1465d46d01267e7","tarball":"https://registry.npmjs.org/use-context-selector/-/use-context-selector-1.2.11.tgz","fileCount":16,"unpackedSize":70274,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfqSmPCRA9TVsSAnZWagAAiAIP/3GI6bMm7mkApXjS/22y\nHRhsuA2d1jhWnSI/uThiV8zsgfViG4lef8sBnYS1iNubsE/UPmJhjr0pHrEJ\ndPJz1QZC6hD6fCXNy80XlRLkZumzBHs5HoXsUK0wi++3gxo7Un78yGpaGUcG\nMft8Mi5pGfMbReFmW7PECwTQgK/FnFvxKJ7XWhg9m9vhcyfJ3gG6ZZyRXyuf\n3KM3DBTgR2Uh2Hv2YObMhB1mxbdIqSeNbdEtlx4o0vK5+gNaw3BNebXXg4t6\nwHLV7COlSHCecb/CPSBlvI+JRpB5h3F9kwDWbFy864I8QiSZnURDX5wJf6nH\nmtXxGjQtQlg4VNpC8QwfKMBNdXO05Ad+UEAhcuPT8Yf7BEIXZ/n0xyWBXQHf\n2maqjwB+PJHVLN4zf7wHPziz2yAf3jWjasJEG7sCbdL4eWx9U38mMs9Lwww7\nZuUw5Td11wdOU/QFHeOwu8QHr0eyt6mtBVfBHgY4Ek/bN8i4XxmHiYuOY6nh\nBAZUOSGHa2e1Yxp+m2/qJJgpieFXCGiuN1l22chM4HIdE3OY0MkLanuS54tc\n19srVzaDMy7gctsU1hVMrNNnamfaXpyxkjMGTEc/NWahVBxyjHjSpB0GA+WI\nd403MMnHr/W9ws1/klY3g/cH9M2FAjA5FsFn1XXAEjE0SEvjgZb/tqGJjFI5\nMIKc\r\n=j/jK\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCOMsBCLvpQ15Y5/W9vSXtbPrt4JkMgCThHbAk4njbkgQIgFlccmRvYvW0X7U/y7DQasW1MFz0nSB8kZUK3O84yIps="}]},"_npmUser":{"name":"daishi","email":"daishi@axlight.com"},"directories":{},"maintainers":[{"name":"daishi","email":"daishi@axlight.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/use-context-selector_1.2.11_1604921742505_0.7245133005454165"},"_hasShrinkwrap":false},"1.2.12":{"name":"use-context-selector","description":"React useContextSelector hook in userland","version":"1.2.12","author":{"name":"Daishi Kato"},"repository":{"type":"git","url":"git+https://github.com/dai-shi/use-context-selector.git"},"source":"./src/index.js","main":"./dist/index.umd.js","module":"./dist/index.modern.js","react-native":"./dist/index.native.modern.js","types":"./src/index.d.ts","sideEffects":false,"scripts":{"compile":"run-s compile:*","compile:dom":"microbundle build -f modern,umd","precompile:native":"mkdir src/native && cp src/index.js src/native/index.js && cp src/batchedUpdates.native.js src/native/batchedUpdates.js","compile:native":"microbundle build -f modern,umd -i ./src/native/index.js -o ./dist/index.native.js","postcompile:native":"rm -r src/native","test":"run-s eslint tsc-test jest","eslint":"eslint --ext .js,.ts,.tsx --ignore-pattern dist .","jest":"jest","tsc-test":"tsc --project . --noEmit","apidoc":"documentation readme --section API --markdown-toc false src/index.js","examples:01_minimal":"DIR=01_minimal EXT=js webpack-dev-server","examples:02_typescript":"DIR=02_typescript webpack-dev-server"},"keywords":["react","context","hooks"],"license":"MIT","dependencies":{},"devDependencies":{"@babel/cli":"^7.12.1","@babel/core":"^7.12.3","@babel/preset-env":"^7.12.1","@babel/preset-react":"^7.12.5","@testing-library/react":"^11.1.1","@types/react":"^16.9.56","@types/react-dom":"^16.9.9","@typescript-eslint/eslint-plugin":"^4.6.1","@typescript-eslint/parser":"^4.6.1","babel-loader":"^8.1.0","documentation":"^13.1.0","eslint":"^7.13.0","eslint-config-airbnb":"^18.2.1","eslint-plugin-import":"^2.22.1","eslint-plugin-jsx-a11y":"^6.4.1","eslint-plugin-react":"^7.21.5","eslint-plugin-react-hooks":"^4.2.0","html-webpack-plugin":"^4.5.0","jest":"^26.6.3","microbundle":"^0.12.4","npm-run-all":"^4.1.5","react":"^17.0.1","react-dom":"^17.0.1","scheduler":"^0.19.1","ts-loader":"^8.0.10","typescript":"^4.0.5","webpack":"^4.44.2","webpack-cli":"^3.3.12","webpack-dev-server":"^3.11.0"},"peerDependencies":{"react":">=16.8.0","scheduler":">=0.19.0","react-dom":"*","react-native":"*"},"peerDependenciesMeta":{"react-dom":{"optional":true},"react-native":{"optional":true}},"babel":{"presets":[["@babel/preset-env",{"targets":"> 0.2%, not dead"}],"@babel/preset-react"]},"gitHead":"e7c213dd85d952ba0611fbef1f4e7e9981b0d691","bugs":{"url":"https://github.com/dai-shi/use-context-selector/issues"},"homepage":"https://github.com/dai-shi/use-context-selector#readme","_id":"use-context-selector@1.2.12","_nodeVersion":"12.19.0","_npmVersion":"6.14.8","dist":{"integrity":"sha512-jw7jpOF/WESMx1dzuKDGD8l/sg+P+tnz5O2t6C4hKOHbTMyjsI6lV5SmGvEGfuQLFFgSrOt6heH6tw9/o3+fZA==","shasum":"2f5f57dfb1d49d8f20bad7db33189ba0faab63d5","tarball":"https://registry.npmjs.org/use-context-selector/-/use-context-selector-1.2.12.tgz","fileCount":16,"unpackedSize":72622,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfwukMCRA9TVsSAnZWagAAmHkP/jYOKNNAA3DJ42MTtBu8\n/C22Fyw2MeKxILKhDjub9U443GOybg/lP7NSaAl1gl0b4MZZevKUgE8wPPqT\nEeYoEAodAa1HeDV4pOl3ph3kqEyAY49SqRB9pPzdca4Og34NbHY8Q0COrdkl\nE8rr7ho+tm0VDvQFdXWc6mtE1jPaQFihroG29LEiCgYgvrLHNIVayUsDlmiJ\nKLaspu8fOKZM+vpXj3CnWxvvJjwUaLPtQ1oaITBRaOTNYUfYxqDUvZ+G0DpK\n584hP04DTQ45ci0Hf1kSFbHbUyzL5HaBfcypcGUWLF9UTuQcmyyg2SbaMT0d\ndtY6t9SMcXV/CV81MSIw4dB2Ef9Vp/A2STybEnRZEna04Zw3FF4VsXRjXI7u\nRgdhqomftqRTKnfhwEq0u23g5brfuuafT50pnFKWH4Rt4VxknX1PcD8UybKX\ncVuTW4tsrlWl5ri55ybQWZ4AObKSLXfpyFG3UGjvk8z+QfI1DGsujTzv/uHJ\n+kJVfXx4J52i8yMhMg7Z3wARF9ilwu5aL9WZCBtCOkIvNDSKxy7iuBJfPMIv\nkVXmPsUw5m7EzB6vy4QuXh36qjalMJHmtcCK9ip3jFsuuy7O7m89iisgJVm7\nB3/OmnxQLJOqkwFC66N9VnAHHg3fzcKkQzdJlK9prDSbrwIuYFkWcwgKbi+k\nXWeL\r\n=CAlv\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCoY4IRz7mZDjqFpMRHw2cfqcH+A3Cj18/S3p+2xkVYLQIgDQA16EftKV16nZA+HE/yoFXT2LmBe7Wew7NiRYndMGE="}]},"_npmUser":{"name":"daishi","email":"daishi@axlight.com"},"directories":{},"maintainers":[{"name":"daishi","email":"daishi@axlight.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/use-context-selector_1.2.12_1606609163518_0.17655637439612737"},"_hasShrinkwrap":false},"1.3.0":{"name":"use-context-selector","description":"React useContextSelector hook in userland","version":"1.3.0","author":{"name":"Daishi Kato"},"repository":{"type":"git","url":"git+https://github.com/dai-shi/use-context-selector.git"},"source":"./src/index.ts","main":"./dist/index.umd.js","module":"./dist/index.modern.js","react-native":"./dist/index.native.modern.js","types":"./dist/src/index.d.ts","sideEffects":false,"scripts":{"compile":"run-s compile:*","compile:dom":"microbundle build -f modern,umd","precompile:native":"mkdir src/native && cp src/index.ts src/native/index.ts && cp src/batchedUpdates.native.ts src/native/batchedUpdates.ts","compile:native":"microbundle build -f modern,umd -i ./src/native/index.ts -o ./dist/index.native.js","postcompile:native":"rm -r src/native","test":"run-s eslint tsc-test jest","eslint":"eslint --ext .js,.ts,.tsx --ignore-pattern dist .","jest":"jest --preset ts-jest/presets/js-with-ts __tests__/*.tsx","tsc-test":"tsc --project . --noEmit","apidoc":"documentation readme --section API --markdown-toc false --parse-extension ts src/*.ts","examples:01_minimal":"DIR=01_minimal EXT=js webpack-dev-server","examples:02_typescript":"DIR=02_typescript webpack-dev-server"},"keywords":["react","context","hooks"],"license":"MIT","dependencies":{},"devDependencies":{"@testing-library/react":"^11.2.2","@types/jest":"^26.0.15","@types/react":"^17.0.0","@types/react-dom":"^17.0.0","@types/scheduler":"^0.16.1","@typescript-eslint/eslint-plugin":"^4.9.0","@typescript-eslint/parser":"^4.9.0","documentation":"^13.1.0","eslint":"^7.14.0","eslint-config-airbnb":"^18.2.1","eslint-plugin-import":"^2.22.1","eslint-plugin-jsx-a11y":"^6.4.1","eslint-plugin-react":"^7.21.5","eslint-plugin-react-hooks":"^4.2.0","html-webpack-plugin":"^4.5.0","jest":"^26.6.3","microbundle":"^0.12.4","npm-run-all":"^4.1.5","react":"^17.0.1","react-dom":"^17.0.1","scheduler":"^0.19.1","ts-jest":"^26.4.4","ts-loader":"^8.0.11","typescript":"^4.1.2","webpack":"^4.44.2","webpack-cli":"^3.3.12","webpack-dev-server":"^3.11.0"},"peerDependencies":{"react":">=16.8.0","react-dom":"*","react-native":"*","scheduler":">=0.19.0"},"peerDependenciesMeta":{"react-dom":{"optional":true},"react-native":{"optional":true}},"gitHead":"d1e16845f13cc4f72afc27ac47029c8a1b978bcb","bugs":{"url":"https://github.com/dai-shi/use-context-selector/issues"},"homepage":"https://github.com/dai-shi/use-context-selector#readme","_id":"use-context-selector@1.3.0","_nodeVersion":"12.19.0","_npmVersion":"6.14.8","dist":{"integrity":"sha512-lM5sbuzLAyy1F3CEPGsJ1Ef4o/FJyrST6BpiFHRTxdWduMBDUjuTq2l5lLN1+zEtg+zeYKyQFzVL7RFmKuc+mA==","shasum":"2c9f2aaed3b8fc6014010cb02c54393ea85aaaef","tarball":"https://registry.npmjs.org/use-context-selector/-/use-context-selector-1.3.0.tgz","fileCount":17,"unpackedSize":77344,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfxjgxCRA9TVsSAnZWagAA5FcP/2gLaw0PKUKnUTlAhamg\nmqh4UT0iSgkBR9XdfovwCEVweiyyjHvg6GZNWHH1Qi7b34CZZcvLXy92B6WX\nQCUBAB8+vO+RFbDM1v+bv0Nx/ycGY1oJfISQQWIiXFAVQzuks4dEdart2OGG\nLP80yYClYiGh2F2MzZSCEw5+IhBtSgyx4JVTPPiu600ThooWEvrXTEZK9OMP\nqiGm11KVwanYbMzwkobejstSc+hot2iGyK5/pc2fKnC0FJTZ9QYpmYRmm0My\nx7zT8C3QR02cPxOjAJLtr0k9n5Ctw6J9nofT7I/Mm/JwboNFbD2Rt2Wm6Lc0\n8z2BERBrVZAPgjfAvC7pjt31U9Hr+Zvv3qJ1R72tFpSMpnOCVLl2nrEuFmZz\nXKMiMBQ9QfXKXkUlHYg2ODCLc7rBfCwV8tfO7imfZnOcuaq8BNt4C+ez3Msy\nEtUyDq6DLYxYCxbzbYD1vLADjHKaj9bkaEf/badM1GI6b/viIzr7XmikHeyU\n1PtnTAiq1SxaEHgadj4vAShrtnj6lzhngxiHNehwYE/IQ6nvXX57sb/8JyNj\njsjRi2F4Bh5uBbhEv3OFWf/dnqWc9Jhsa38NZUPn38f4rX1/Ovn6ZTrNAwXN\nq9ulLA1gxQSx89lJEfbR/eIP7BItIeE6r8rDAXkZbmof3uCbiIF6GfLcbNO7\nlbPr\r\n=qbbP\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDJqFEZNetoguHclcgk+9jFnI1v5NM1NQYZ1EgIHTcN1QIgchqXY8CpzTTR8mjMGcVyvSmIx/013tYwXPzDLYUYjTo="}]},"_npmUser":{"name":"daishi","email":"daishi@axlight.com"},"directories":{},"maintainers":[{"name":"daishi","email":"daishi@axlight.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/use-context-selector_1.3.0_1606826033252_0.21196613994615854"},"_hasShrinkwrap":false},"1.3.1":{"name":"use-context-selector","description":"React useContextSelector hook in userland","version":"1.3.1","author":{"name":"Daishi Kato"},"repository":{"type":"git","url":"git+https://github.com/dai-shi/use-context-selector.git"},"source":"./src/index.ts","main":"./dist/index.umd.js","module":"./dist/index.modern.js","react-native":"./dist/index.native.modern.js","types":"./dist/src/index.d.ts","sideEffects":false,"scripts":{"compile":"run-s compile:*","compile:dom":"microbundle build -f modern,umd","precompile:native":"mkdir src/native && cp src/index.ts src/native/index.ts && cp src/batchedUpdates.native.ts src/native/batchedUpdates.ts","compile:native":"microbundle build -f modern,umd -i ./src/native/index.ts -o ./dist/index.native.js","postcompile:native":"rm -r src/native","test":"run-s eslint tsc-test jest","eslint":"eslint --ext .js,.ts,.tsx --ignore-pattern dist .","jest":"jest --preset ts-jest/presets/js-with-ts __tests__/*.tsx","tsc-test":"tsc --project . --noEmit","apidoc":"documentation readme --section API --markdown-toc false --parse-extension ts src/*.ts","examples:01_minimal":"DIR=01_minimal EXT=js webpack-dev-server","examples:02_typescript":"DIR=02_typescript webpack-dev-server"},"keywords":["react","context","hooks"],"license":"MIT","dependencies":{},"devDependencies":{"@testing-library/react":"^11.2.2","@types/jest":"^26.0.15","@types/react":"^17.0.0","@types/react-dom":"^17.0.0","@types/scheduler":"^0.16.1","@typescript-eslint/eslint-plugin":"^4.9.0","@typescript-eslint/parser":"^4.9.0","documentation":"^13.1.0","eslint":"^7.14.0","eslint-config-airbnb":"^18.2.1","eslint-plugin-import":"^2.22.1","eslint-plugin-jsx-a11y":"^6.4.1","eslint-plugin-react":"^7.21.5","eslint-plugin-react-hooks":"^4.2.0","html-webpack-plugin":"^4.5.0","jest":"^26.6.3","microbundle":"^0.12.4","npm-run-all":"^4.1.5","react":"^17.0.1","react-dom":"^17.0.1","scheduler":"^0.19.1","ts-jest":"^26.4.4","ts-loader":"^8.0.11","typescript":"^4.1.2","webpack":"^4.44.2","webpack-cli":"^3.3.12","webpack-dev-server":"^3.11.0"},"peerDependencies":{"react":">=16.8.0","react-dom":"*","react-native":"*","scheduler":">=0.19.0"},"peerDependenciesMeta":{"react-dom":{"optional":true},"react-native":{"optional":true}},"gitHead":"2ad90371bf169ad8d461baa265f3ef886fee8583","bugs":{"url":"https://github.com/dai-shi/use-context-selector/issues"},"homepage":"https://github.com/dai-shi/use-context-selector#readme","_id":"use-context-selector@1.3.1","_nodeVersion":"12.20.0","_npmVersion":"6.14.8","dist":{"integrity":"sha512-9II7w806dR5vUa8XgDNgXruZcCYHktc+MB767CAF8eTE+jgX8qiE05uISGj8JndjyxFV+gVMQrZSoLj9FsoDdg==","shasum":"a2ebbd4e9c16187527c5903aa0f351901fa1201e","tarball":"https://registry.npmjs.org/use-context-selector/-/use-context-selector-1.3.1.tgz","fileCount":17,"unpackedSize":76659,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfyLknCRA9TVsSAnZWagAARN0P/iJoGlOialGc+cbJC2Pr\ntCdOeA1T4WxoQ1S1uUKxpMx1SIyack2hO5YOFc5+gx5sKrdfsbZ7P3awKCqb\nJAVR7tsgOr0Jo2n4aM2siK0MPq7hoF4Su9+hKbjcLlPaJc0W47cQEZW7M94V\nuPyjSXo+QZ1p9sY5SWv6L53xr5XfyaxWWdM4hk6Fi7YTHW6F8g6oU4y4sf+8\nMe8BYn3JwX0GDOkKi0/55eAX6K0u89I3ZRVCSbZebqDS+s/UduFaSPwoMbhH\nPBMfy9EtQB9QyRnrQNTZbCQFdjlFqwpsvSZV2xUTjsdf7HPBo1ytSsBqZwh3\n0zpFWmB21uwYzcEMhiqkZyx+hg226TR/aHIkPd5qA4gvJjc4Id7J3YOglKk/\n9ZKPyHvZONwwU+gwe27iPI+KS8U4p53x+I8lmIc+T0GXut2ttb/Y6Qh4wZE5\nGEe3dxNFK/L4Glt2eEwPgpk4gwUzrQRQnsEh2I+JRB0+abb6AU2fHRCnZ2on\ngQry+ajrYc0nFHa9+EXi0N/NzGd1kI5P3HpDlH2yzhtkmu30oH0wxbGwa6XH\n1WMHS+1iShq7tQQHNpIRNjm1lD/rP1QRbdwPhug4aOw2Bne7Zo05pj0k2EIO\nke6OhR1npEi4a+yTjK7aMAB8HXSErU2tkGk6flrBh/4Gds8T2Dct2+bp7qrD\nN8bq\r\n=Nfta\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD6iQ1jeO7kgskKF0VT7wQzy1jAYXFFkTdKXQX9u5dArwIhAOL0WHXhOQxYE4NQG7uDNPwtDCjCapbmcDizLWHMvTMa"}]},"_npmUser":{"name":"daishi","email":"daishi@axlight.com"},"directories":{},"maintainers":[{"name":"daishi","email":"daishi@axlight.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/use-context-selector_1.3.1_1606990118935_0.6542436083177703"},"_hasShrinkwrap":false},"1.3.2":{"name":"use-context-selector","description":"React useContextSelector hook in userland","version":"1.3.2","author":{"name":"Daishi Kato"},"repository":{"type":"git","url":"git+https://github.com/dai-shi/use-context-selector.git"},"source":"./src/index.ts","main":"./dist/index.umd.js","module":"./dist/index.modern.js","react-native":"./dist/index.native.modern.js","types":"./dist/src/index.d.ts","sideEffects":false,"scripts":{"compile":"run-s compile:*","compile:dom":"microbundle build -f modern,umd","precompile:native":"mkdir src/native && cp src/index.ts src/native/index.ts && cp src/batchedUpdates.native.ts src/native/batchedUpdates.ts","compile:native":"microbundle build -f modern,umd -i ./src/native/index.ts -o ./dist/index.native.js","postcompile:native":"rm -r src/native","test":"run-s eslint tsc-test jest","eslint":"eslint --ext .js,.ts,.tsx --ignore-pattern dist .","jest":"jest --preset ts-jest/presets/js-with-ts __tests__/*.tsx","tsc-test":"tsc --project . --noEmit","apidoc":"documentation readme --section API --markdown-toc false --parse-extension ts src/*.ts","examples:01_minimal":"DIR=01_minimal EXT=js webpack-dev-server","examples:02_typescript":"DIR=02_typescript webpack-dev-server"},"keywords":["react","context","hooks"],"license":"MIT","dependencies":{},"devDependencies":{"@testing-library/react":"^11.2.2","@types/jest":"^26.0.15","@types/react":"^17.0.0","@types/react-dom":"^17.0.0","@types/scheduler":"^0.16.1","@typescript-eslint/eslint-plugin":"^4.9.0","@typescript-eslint/parser":"^4.9.0","documentation":"^13.1.0","eslint":"^7.14.0","eslint-config-airbnb":"^18.2.1","eslint-plugin-import":"^2.22.1","eslint-plugin-jsx-a11y":"^6.4.1","eslint-plugin-react":"^7.21.5","eslint-plugin-react-hooks":"^4.2.0","html-webpack-plugin":"^4.5.0","jest":"^26.6.3","microbundle":"^0.12.4","npm-run-all":"^4.1.5","react":"^17.0.1","react-dom":"^17.0.1","scheduler":"^0.19.1","ts-jest":"^26.4.4","ts-loader":"^8.0.11","typescript":"^4.1.2","webpack":"^4.44.2","webpack-cli":"^3.3.12","webpack-dev-server":"^3.11.0"},"peerDependencies":{"react":">=16.8.0","react-dom":"*","react-native":"*","scheduler":">=0.19.0"},"peerDependenciesMeta":{"react-dom":{"optional":true},"react-native":{"optional":true}},"gitHead":"aa5c2d7fe33343c38073969227825f1cb119ccbe","bugs":{"url":"https://github.com/dai-shi/use-context-selector/issues"},"homepage":"https://github.com/dai-shi/use-context-selector#readme","_id":"use-context-selector@1.3.2","_nodeVersion":"12.20.0","_npmVersion":"6.14.8","dist":{"integrity":"sha512-XRRlZD8+FIac3RtmOEqq8SizNEQI6oldteuOWu+F+pDooiJPPaFgw+8wckX+/fuJ80DRJB9HP99UdIq8A1YSMA==","shasum":"326a76875be2914c2d5cabf63349cbd9fda09d34","tarball":"https://registry.npmjs.org/use-context-selector/-/use-context-selector-1.3.2.tgz","fileCount":17,"unpackedSize":76413,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfyL3HCRA9TVsSAnZWagAA8L4P/29Fgi2LtYYkfoiiuXUO\nxadpfz1NQ/QzefCCgCUVaMJx5l+7gfaODEPImhExGu1j6na41pOeNFhHvwbZ\nG2Wt30aUiUL1U8/Gd7wqKdeJWUFTAN4K1jEbqIqF00sUj8+U7iDI6mQsNZkB\n0m5F6GWvuRz6vwwsjkYC2N7el3k5JxVeVUET7lMZsfJHYMjYBY05zuA7NB4m\n8jqAb37RPTC7oL7ojrWxOKqZvkiFO82oiuVyP6GZefPOTkKKyiA8jyZyUiXC\nrjBPay9J8fAsKHG3q9jFOO4Z+7VOFY2ib265neqZ19de2L3mFDkLiR/lZ5on\nasmzc4iNVefw6afyExQzNwBuebwUQqP36a6LgqVrYB/XxCwFlCidaSG2bz5C\nA68R3WRTTFcRuduXnh18wbgRZFZPa1S7/Eef96QL0Mxrj1vww7pfoUP8MjXw\nbeWxDgjC4MyF6XsLXaa8CXBa5zXsL3kXvA2JW7y3KEbsGy1Ua3HHF9Yw1X/Y\nfOGs8uR3Kjh38x4HwdbNNE2s7Yw3EAh8OaDYW3l7sUpEXUWUSltsVeMV5zmr\n0P2POP9xPTSSf7pDAh/qGm9B7TDwBjvY8VtQRUl5fh8Ho1cWsUPJ43Wo1huB\n4Y4LXwmb8CZT9DNdT/Ixwy9V2b50o9I+3YukqUPXQt0GJc4PavmQHCobAmTt\nG4NJ\r\n=FN1D\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIAZTwPu8ccFhR7bW8bkJtUqDRtTTlfHn7cj+2a/yQA3oAiA6GaC1o/KHi7GfDvaMObFubi4uNACHAfw7EFNKOgvvTQ=="}]},"_npmUser":{"name":"daishi","email":"daishi@axlight.com"},"directories":{},"maintainers":[{"name":"daishi","email":"daishi@axlight.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/use-context-selector_1.3.2_1606991303531_0.6268749850344664"},"_hasShrinkwrap":false},"1.3.3":{"name":"use-context-selector","description":"React useContextSelector hook in userland","version":"1.3.3","author":{"name":"Daishi Kato"},"repository":{"type":"git","url":"git+https://github.com/dai-shi/use-context-selector.git"},"source":"./src/index.ts","main":"./dist/index.umd.js","module":"./dist/index.modern.js","react-native":"./dist/index.native.modern.js","types":"./dist/src/index.d.ts","sideEffects":false,"scripts":{"compile":"run-s compile:*","compile:dom":"microbundle build -f modern,umd","precompile:native":"mkdir src/native && cp src/index.ts src/native/index.ts && cp src/batchedUpdates.native.ts src/native/batchedUpdates.ts","compile:native":"microbundle build -f modern,umd -i ./src/native/index.ts -o ./dist/index.native.js","postcompile:native":"rm -r src/native","test":"run-s eslint tsc-test jest","eslint":"eslint --ext .js,.ts,.tsx --ignore-pattern dist .","jest":"jest --preset ts-jest/presets/js-with-ts __tests__/*.tsx","tsc-test":"tsc --project . --noEmit","apidoc":"documentation readme --section API --markdown-toc false --parse-extension ts src/*.ts","examples:01_minimal":"DIR=01_minimal EXT=js webpack-dev-server","examples:02_typescript":"DIR=02_typescript webpack-dev-server"},"keywords":["react","context","hooks"],"license":"MIT","dependencies":{},"devDependencies":{"@testing-library/react":"^11.2.2","@types/jest":"^26.0.15","@types/react":"^17.0.0","@types/react-dom":"^17.0.0","@types/scheduler":"^0.16.1","@typescript-eslint/eslint-plugin":"^4.9.0","@typescript-eslint/parser":"^4.9.0","documentation":"^13.1.0","eslint":"^7.14.0","eslint-config-airbnb":"^18.2.1","eslint-plugin-import":"^2.22.1","eslint-plugin-jsx-a11y":"^6.4.1","eslint-plugin-react":"^7.21.5","eslint-plugin-react-hooks":"^4.2.0","html-webpack-plugin":"^4.5.0","jest":"^26.6.3","microbundle":"^0.12.4","npm-run-all":"^4.1.5","react":"^17.0.1","react-dom":"^17.0.1","scheduler":"^0.19.1","ts-jest":"^26.4.4","ts-loader":"^8.0.11","typescript":"^4.1.2","webpack":"^4.44.2","webpack-cli":"^3.3.12","webpack-dev-server":"^3.11.0"},"peerDependencies":{"react":">=16.8.0","react-dom":"*","react-native":"*","scheduler":">=0.19.0"},"peerDependenciesMeta":{"react-dom":{"optional":true},"react-native":{"optional":true}},"gitHead":"b2ded121618778c70a7d74f72489874246f9fdf2","bugs":{"url":"https://github.com/dai-shi/use-context-selector/issues"},"homepage":"https://github.com/dai-shi/use-context-selector#readme","_id":"use-context-selector@1.3.3","_nodeVersion":"12.20.0","_npmVersion":"6.14.8","dist":{"integrity":"sha512-4rkUVooAsRJBmOEgWM43LhTq2oN+3rq9721dm+nrIOh2eaksS0GHcvmB2DwVhLiD92cmQN3IBYZdy1GNXknb2A==","shasum":"49f97503dc021e8f1493420003a74639bd50d6f9","tarball":"https://registry.npmjs.org/use-context-selector/-/use-context-selector-1.3.3.tgz","fileCount":17,"unpackedSize":77473,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf04fTCRA9TVsSAnZWagAAzhcQAJlYegPRgtan7JWrTMpI\nTtVdFb+pYF0Cz0nI4QW+KjIZWFHfi9z2hj656kNBpD2LVMvjznBQIIQsombh\nF8vQq/UFbrrmLN+0matTX6bO+A1f0GLzK+JCxfQkPnd5RYleR+WyvgWhyc52\nDfn857wWQroX6MXC17SPOZwWQeQilAX4FGxOV3iB7z+jPw7cyyieOOj0Jp75\nNBA1J2DaZ/oZrzVCR1FvzLw+0OT77kPJ/kyM0LGHkc/Yp510/fItQoKICOS8\nVw9+zeEl3TOP48OuPHfyNJh8qbeIJjQDO9Cmt9kKE2V6AIqnQJ1Fefcwuv9m\nFQImgjENeliLZGkL5a6rYw5cWr4JlUclLDQzoyWYCrbi2VxCpn61m50/bmkT\njwXs+v0y3qulCTJ6C8APylIVUHSxsl3YYUZLNoDU2qR3TPyEpHwBtkxR8IM6\n52rU2M/T66vNh+CUCxXOU6Q7/twntoR++X++4yhzhEzeoNoI7pfJvVZpXC/T\n8Fr6p3egK5Sd6S5PNWSOlJv8asqTqsYEaD1QzVEoqvEf0IXO607STNpSA5PD\noSug6psrG8OfHx9OOpwuLuGcM3Q02nIGbWQOj/suHlSbOK9K4eHstZGmUmxB\ncEvqaE/sjJyX2k77hqHJqaKa7+iLe0Oi+jqM0RIHd+rZWkxA4tcpnuP3W/mU\nzFUY\r\n=MRFg\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIBYeeo14pQkjf0WPr7S9A84uUGPespwsl2KmiF6aX9FqAiEAsSE+frvuXFeOC5WxlngO1EP2eBrAM4Tekvb5Ypp8zDU="}]},"_npmUser":{"name":"daishi","email":"daishi@axlight.com"},"directories":{},"maintainers":[{"name":"daishi","email":"daishi@axlight.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/use-context-selector_1.3.3_1607698387328_0.21778773534206808"},"_hasShrinkwrap":false},"1.3.4":{"name":"use-context-selector","description":"React useContextSelector hook in userland","version":"1.3.4","author":{"name":"Daishi Kato"},"repository":{"type":"git","url":"git+https://github.com/dai-shi/use-context-selector.git"},"source":"./src/index.ts","main":"./dist/index.umd.js","module":"./dist/index.modern.js","react-native":"./dist/index.native.modern.js","types":"./dist/src/index.d.ts","sideEffects":false,"scripts":{"compile":"run-s compile:*","compile:dom":"microbundle build -f modern,umd","precompile:native":"mkdir src/native && cp src/index.ts src/native/index.ts && cp src/batchedUpdates.native.ts src/native/batchedUpdates.ts","compile:native":"microbundle build -f modern,umd -i ./src/native/index.ts -o ./dist/index.native.js","postcompile:native":"rm -r src/native","test":"run-s eslint tsc-test jest","eslint":"eslint --ext .js,.ts,.tsx --ignore-pattern dist .","jest":"jest --preset ts-jest/presets/js-with-ts __tests__/*.tsx","tsc-test":"tsc --project . --noEmit","apidoc":"documentation readme --section API --markdown-toc false --parse-extension ts src/*.ts","examples:01_minimal":"DIR=01_minimal EXT=js webpack-dev-server","examples:02_typescript":"DIR=02_typescript webpack-dev-server"},"keywords":["react","context","hooks"],"license":"MIT","dependencies":{},"devDependencies":{"@testing-library/react":"^11.2.2","@types/jest":"^26.0.19","@types/react":"^17.0.0","@types/react-dom":"^17.0.0","@types/scheduler":"^0.16.1","@typescript-eslint/eslint-plugin":"^4.9.1","@typescript-eslint/parser":"^4.9.1","documentation":"^13.1.0","eslint":"^7.15.0","eslint-config-airbnb":"^18.2.1","eslint-plugin-import":"^2.22.1","eslint-plugin-jsx-a11y":"^6.4.1","eslint-plugin-react":"^7.21.5","eslint-plugin-react-hooks":"^4.2.0","html-webpack-plugin":"^4.5.0","jest":"^26.6.3","microbundle":"^0.12.4","npm-run-all":"^4.1.5","react":"^17.0.1","react-dom":"^17.0.1","scheduler":"^0.19.1","ts-jest":"^26.4.4","ts-loader":"^8.0.12","typescript":"^4.1.3","webpack":"^4.44.2","webpack-cli":"^3.3.12","webpack-dev-server":"^3.11.0"},"peerDependencies":{"react":">=16.8.0","react-dom":"*","react-native":"*","scheduler":">=0.19.0"},"peerDependenciesMeta":{"react-dom":{"optional":true},"react-native":{"optional":true}},"gitHead":"cc2c8540fe6bca866d8bc804973fd06309f3ecb9","bugs":{"url":"https://github.com/dai-shi/use-context-selector/issues"},"homepage":"https://github.com/dai-shi/use-context-selector#readme","_id":"use-context-selector@1.3.4","_nodeVersion":"12.20.0","_npmVersion":"6.14.8","dist":{"integrity":"sha512-grPPE71izEavAv39WF1r1QPZ6Ya41rnjTeLQGMP5yz3VShGQKMDThKXMRUdrDE71pOoaD4pvhFTsDbTjBqxdWg==","shasum":"918dde11a8303485e9046c95713936424f04da8e","tarball":"https://registry.npmjs.org/use-context-selector/-/use-context-selector-1.3.4.tgz","fileCount":17,"unpackedSize":75095,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf1Cx/CRA9TVsSAnZWagAAa4gP/RZc+6pkZ9aEn60gGuBv\ninXnfA7xyS+FY07gze8aUZlbTY3/+tJVCHRCuFo6ZTWzca47/lDEW2pVa7jP\n0NwAPHZz1txW+WmymEvFrKTV4HEPZJ46Mj5OOkbMTA4vSlUIJHNFo2s37YR6\nnjyb9Cs80ZMUnwyfoVYTEEI1q88ZmopmU3/dW8R2J5bAxV8+yjwWPvjd9ltU\nOtm91vCE0ewBPbWHnyppHm8OZ13VpHrni2/y9+oBQDSOju/1cyB8SkixJoaq\n27tsR0sVpF8Sy9kpzi4vVEJf87M2CctU9tqk1lx3xmoC3zD7+hKjvr7vUP4r\nSMaSrCQYu7bPKIKlW1LJtnWJpGxjv+iSDOxYA4pBZ5zQPqa3jpPfLL52gcJs\nlFPeR83vYOD9WR0GMFqQdRXwj4Ejtq8Yh2Y6RfodxImskNkcHMpdJsFilTA+\n7TyXm5aB577EYWrbSa9bR2ZzbcOrc3illBVbTHHIiexTHQqJUPvKeZ1YIZiA\n0hdBTCF07moDKWQ1epa6bWTZadAGTYsmngsVoEFBe73cvS0JpQgPHBANtoBa\ngjJrqqpwG7x4VOAo8KGNEwwzpiTJ4Ml87VL58r/rRVHRgrDngVcmpeaYYpYj\nBvq6Fzu5S4VmYpas1GqC3+URSsM0k57J1xUpMr2pgIXVfGbszW8moQcwVgpg\n+d6e\r\n=nj24\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIDKV13gequLu1R5WqS/wR4GpOLXqdHai+A8Z49m5I6tJAiAKDCPxRomtfiKkKqvDH0PcFhbbjKL6C/2HkdxKyHRlWg=="}]},"_npmUser":{"name":"daishi","email":"daishi@axlight.com"},"directories":{},"maintainers":[{"name":"daishi","email":"daishi@axlight.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/use-context-selector_1.3.4_1607740542401_0.7133681446916391"},"_hasShrinkwrap":false},"1.3.5":{"name":"use-context-selector","description":"React useContextSelector hook in userland","version":"1.3.5","author":{"name":"Daishi Kato"},"repository":{"type":"git","url":"git+https://github.com/dai-shi/use-context-selector.git"},"source":"./src/index.ts","main":"./dist/index.umd.js","module":"./dist/index.modern.js","react-native":"./dist/index.native.modern.js","types":"./dist/src/index.d.ts","sideEffects":false,"scripts":{"compile":"run-s compile:*","compile:dom":"microbundle build -f modern,umd","precompile:native":"mkdir src/native && cp src/index.ts src/native/index.ts && cp src/batchedUpdates.native.ts src/native/batchedUpdates.ts","compile:native":"microbundle build -f modern,umd -i ./src/native/index.ts -o ./dist/index.native.js","postcompile:native":"rm -r src/native","test":"run-s eslint tsc-test jest","eslint":"eslint --ext .js,.ts,.tsx --ignore-pattern dist .","jest":"jest --preset ts-jest/presets/js-with-ts __tests__/*.tsx","tsc-test":"tsc --project . --noEmit","apidoc":"documentation readme --section API --markdown-toc false --parse-extension ts src/*.ts","examples:01_minimal":"DIR=01_minimal EXT=js webpack-dev-server","examples:02_typescript":"DIR=02_typescript webpack-dev-server"},"keywords":["react","context","hooks"],"license":"MIT","dependencies":{},"devDependencies":{"@testing-library/react":"^11.2.2","@types/jest":"^26.0.19","@types/react":"^17.0.0","@types/react-dom":"^17.0.0","@types/scheduler":"^0.16.1","@typescript-eslint/eslint-plugin":"^4.9.1","@typescript-eslint/parser":"^4.9.1","documentation":"^13.1.0","eslint":"^7.15.0","eslint-config-airbnb":"^18.2.1","eslint-plugin-import":"^2.22.1","eslint-plugin-jsx-a11y":"^6.4.1","eslint-plugin-react":"^7.21.5","eslint-plugin-react-hooks":"^4.2.0","html-webpack-plugin":"^4.5.0","jest":"^26.6.3","microbundle":"^0.12.4","npm-run-all":"^4.1.5","react":"^17.0.1","react-dom":"^17.0.1","scheduler":"^0.19.1","ts-jest":"^26.4.4","ts-loader":"^8.0.12","typescript":"^4.1.3","webpack":"^4.44.2","webpack-cli":"^3.3.12","webpack-dev-server":"^3.11.0"},"peerDependencies":{"react":">=16.8.0","react-dom":"*","react-native":"*","scheduler":">=0.19.0"},"peerDependenciesMeta":{"react-dom":{"optional":true},"react-native":{"optional":true}},"gitHead":"65eaf66e27555a78f3f46397f535c8b03f0b7899","bugs":{"url":"https://github.com/dai-shi/use-context-selector/issues"},"homepage":"https://github.com/dai-shi/use-context-selector#readme","_id":"use-context-selector@1.3.5","_nodeVersion":"12.20.0","_npmVersion":"6.14.8","dist":{"integrity":"sha512-pYHLEuY3VzboKmHVpT2AABUbzhgKvKUVr7HpDtsRZ9BOJo0dF2U/AS2IEySl6cEKL5RFZP99Fp825dl0SBeqHA==","shasum":"ae1acc14fd504d93c42cbebd4636bf282480aea4","tarball":"https://registry.npmjs.org/use-context-selector/-/use-context-selector-1.3.5.tgz","fileCount":17,"unpackedSize":78567,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf9a+ZCRA9TVsSAnZWagAA03kP/RpDvqIh6tMYlgoEgP1T\n/q4KTrjg5aUKwRMOaJW2bdJrEirrPRHCXOA6QeSEGx4LqKJ2aWQwH2hiF/Et\n0Q10jy+Cbg/GG6IT30SE4ipkg+d2MPJ6CmxT85Uec8tJxEhQ7nQMAn394/Ng\nl20GpnlwLgMhIcQsL15zy/2+q40n2lNuXmmNLnCF+tA2R3fsoFmXqSu4Wrj9\nWdRmOBErFtFSvLFt8Ptenq/F5pgcyiw89TOTvFqMVsIgyuFPMuOMbJ7EU22g\nPA7Q7EhpFU1ltUnN7zDRUa9cnBr8ZEkPT10GW8AB85Abw2R3PmH2dqeBpBaQ\n7M+PU/cRhYTDm+zDKXw22M4JgoPcQc8ZHXTjWyCemAfsDHciTncx5k4We09G\nZ6V4rusbtn2DCaoPPnscT3+l7qB4hmRq18gi3FuY5xQi/ymg4QQMHDeiWMOr\n6qm1DzDO7PhlC6yHxMKK7pG86U8ui9DEQ07zFC8Hf4MJffOoG/oxIrFiljyf\n5kER84G80or8hkRCZsG08xhPfBuGqobjeVuc2qLuJehBtJA8Zu482/ipS8k4\ncyqBYE36mDF5dr3Faxk9yTirGf86rGvYiupWZED+WbJFJLpFt4MSrfNIDIkT\nAGgANHnqn85Wfs9YaL1OF9WGuJyFPZYNsyvxIxYYwXh2E5PYPgxKQ4IqXsps\nV2WN\r\n=B3Tm\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIB4OJUywjCaNlRGnAUij7kNZmCVwxS88WaSZt+Ett4t2AiByusARS3CPIUJmta8yB+ECJ7ZT7Fm4gdWhbhXS94O+5A=="}]},"_npmUser":{"name":"daishi","email":"daishi@axlight.com"},"directories":{},"maintainers":[{"name":"daishi","email":"daishi@axlight.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/use-context-selector_1.3.5_1609936793037_0.04434406681320402"},"_hasShrinkwrap":false},"1.3.6":{"name":"use-context-selector","description":"React useContextSelector hook in userland","version":"1.3.6","author":{"name":"Daishi Kato"},"repository":{"type":"git","url":"git+https://github.com/dai-shi/use-context-selector.git"},"source":"./src/index.ts","main":"./dist/index.umd.js","module":"./dist/index.modern.js","react-native":"./dist/index.native.modern.js","types":"./dist/src/index.d.ts","sideEffects":false,"scripts":{"compile":"run-s compile:*","compile:dom":"microbundle build -f modern,umd","precompile:native":"mkdir src/native && cp src/index.ts src/native/index.ts && cp src/batchedUpdates.native.ts src/native/batchedUpdates.ts","compile:native":"microbundle build -f modern,umd -i ./src/native/index.ts -o ./dist/index.native.js","postcompile:native":"rm -r src/native","test":"run-s eslint tsc-test jest","eslint":"eslint --ext .js,.ts,.tsx --ignore-pattern dist .","jest":"jest --preset ts-jest/presets/js-with-ts __tests__/*.tsx","tsc-test":"tsc --project . --noEmit","apidoc":"documentation readme --section API --markdown-toc false --parse-extension ts src/*.ts","examples:01_minimal":"DIR=01_minimal EXT=js webpack-dev-server","examples:02_typescript":"DIR=02_typescript webpack-dev-server"},"keywords":["react","context","hooks"],"license":"MIT","dependencies":{},"devDependencies":{"@testing-library/react":"^11.2.2","@types/jest":"^26.0.19","@types/react":"^17.0.0","@types/react-dom":"^17.0.0","@types/scheduler":"^0.16.1","@typescript-eslint/eslint-plugin":"^4.9.1","@typescript-eslint/parser":"^4.9.1","documentation":"^13.1.0","eslint":"^7.15.0","eslint-config-airbnb":"^18.2.1","eslint-plugin-import":"^2.22.1","eslint-plugin-jsx-a11y":"^6.4.1","eslint-plugin-react":"^7.21.5","eslint-plugin-react-hooks":"^4.2.0","html-webpack-plugin":"^4.5.0","jest":"^26.6.3","microbundle":"^0.12.4","npm-run-all":"^4.1.5","react":"^17.0.1","react-dom":"^17.0.1","scheduler":"^0.19.1","ts-jest":"^26.4.4","ts-loader":"^8.0.12","typescript":"^4.1.3","webpack":"^4.44.2","webpack-cli":"^3.3.12","webpack-dev-server":"^3.11.0"},"peerDependencies":{"react":">=16.8.0","react-dom":"*","react-native":"*","scheduler":">=0.19.0"},"peerDependenciesMeta":{"react-dom":{"optional":true},"react-native":{"optional":true}},"gitHead":"9be3565a46b93e69bfdbe6166e7ca3dfbd33e686","bugs":{"url":"https://github.com/dai-shi/use-context-selector/issues"},"homepage":"https://github.com/dai-shi/use-context-selector#readme","_id":"use-context-selector@1.3.6","_nodeVersion":"12.20.0","_npmVersion":"6.14.8","dist":{"integrity":"sha512-M+2NnqVfSZ+P3UMyD+sei8dJL+ebd7ze6xlErjvM0DQal/vr6+F9q5QuvGvZ6eqb1JB18FmoLSrFYqF0FsEylg==","shasum":"76ff0687a7cf0f6080eb583f654aaaa07590368c","tarball":"https://registry.npmjs.org/use-context-selector/-/use-context-selector-1.3.6.tgz","fileCount":17,"unpackedSize":79021,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgCwU1CRA9TVsSAnZWagAAjxkQAKEk5GNZKLbZ78iPDGAG\nCDWkz44plDHlTnz948pqKGt2PHmqVosQUxsANWGLP5ppQ6EC5RXmK0ceZ5N9\nKxaiCoyU9+EtSiLaMOkRS+j0IdAOeJVbRmkvciULGbdg7M5gMx8lQKxyp/U7\nNpRXI3fo5AteyLa78svd5Tr6KqyTLjSiXNvgejowebCYzgBUVhsLA+x5Bjog\nvMEl/duEP20k83x4f7DClDnv1SlrTwbBgYdr1wR/B5d0Hhii7tMP+FxIUGm9\n+ydWOsaUMkhZI5LrFSA2X/ud5gTwBAxzejd4EN98jBEdFBmBNLlKpImcl64b\ncFBBYNLc5vtyVxN2C18dwY//PlW9RI0sfUpYHqZTDHejN3+5IFP/WbKNejf9\nqz0xLZtadvoBKn8iCkUFUrgQsxiujGwuQifpdDktY98938E6I6Dc36XCLXLl\nL0JOP+em81IjK18SCh1mqpk0i3sqMgGYOxc1fRs6zuJZxrJJ/OEoet427hSs\n4C2ZC5omlR/B+UaoxqyknuJIpventMSkD/QGw3X9tmvPYKV+FeJzIgqJnzBo\nuYuVk9K8fTiqLXa0g0MF2ZMS1doBoGdJxrXULBK7+hlJap34sYGu6uUEv0IY\nfrGq/dnxTm2+bHuLBDCk3pOYiO8Jfh9dUJMjE34KQPoNIgSpEAh+ntaa+sSs\n4ZLZ\r\n=1XOn\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCxcR0yUfJw3kWsxIIVuPiuzH5F0+bvGsu8ml02ptuEFQIhAL3Ek6Xghf0upfbddQGpK2WaQEYkHZYvQj6GjKucihBC"}]},"_npmUser":{"name":"daishi","email":"daishi@axlight.com"},"directories":{},"maintainers":[{"name":"daishi","email":"daishi@axlight.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/use-context-selector_1.3.6_1611334964611_0.5862649930231505"},"_hasShrinkwrap":false},"1.3.7":{"name":"use-context-selector","description":"React useContextSelector hook in userland","version":"1.3.7","author":{"name":"Daishi Kato"},"repository":{"type":"git","url":"git+https://github.com/dai-shi/use-context-selector.git"},"source":"./src/index.ts","main":"./dist/index.umd.js","module":"./dist/index.modern.js","react-native":"./dist/index.native.modern.js","types":"./dist/src/index.d.ts","sideEffects":false,"scripts":{"compile":"run-s compile:*","compile:dom":"microbundle build -f modern,umd","precompile:native":"mkdir src/native && cp src/index.ts src/native/index.ts && cp src/batchedUpdates.native.ts src/native/batchedUpdates.ts","compile:native":"microbundle build -f modern,umd -i ./src/native/index.ts -o ./dist/index.native.js","postcompile:native":"rm -r src/native","test":"run-s eslint tsc-test jest","eslint":"eslint --ext .js,.ts,.tsx --ignore-pattern dist .","jest":"jest --preset ts-jest/presets/js-with-ts __tests__/*.tsx","tsc-test":"tsc --project . --noEmit","apidoc":"documentation readme --section API --markdown-toc false --parse-extension ts src/*.ts","examples:01_minimal":"DIR=01_minimal EXT=js webpack-dev-server","examples:02_typescript":"DIR=02_typescript webpack-dev-server"},"keywords":["react","context","hooks"],"license":"MIT","dependencies":{},"devDependencies":{"@testing-library/react":"^11.2.3","@types/jest":"^26.0.20","@types/react":"^17.0.0","@types/react-dom":"^17.0.0","@types/scheduler":"^0.16.1","@typescript-eslint/eslint-plugin":"^4.14.0","@typescript-eslint/parser":"^4.14.0","documentation":"^13.1.1","eslint":"^7.18.0","eslint-config-airbnb":"^18.2.1","eslint-plugin-import":"^2.22.1","eslint-plugin-jsx-a11y":"^6.4.1","eslint-plugin-react":"^7.22.0","eslint-plugin-react-hooks":"^4.2.0","html-webpack-plugin":"^4.5.1","jest":"^26.6.3","microbundle":"^0.13.0","npm-run-all":"^4.1.5","react":"^17.0.1","react-dom":"^17.0.1","scheduler":"^0.19.1","ts-jest":"^26.4.4","ts-loader":"^8.0.14","typescript":"^4.1.3","webpack":"^4.44.2","webpack-cli":"^3.3.12","webpack-dev-server":"^3.11.2"},"peerDependencies":{"react":">=16.8.0","react-dom":"*","react-native":"*","scheduler":">=0.19.0"},"peerDependenciesMeta":{"react-dom":{"optional":true},"react-native":{"optional":true}},"gitHead":"9323019f86b5292e766fce712b9710a722afcda9","bugs":{"url":"https://github.com/dai-shi/use-context-selector/issues"},"homepage":"https://github.com/dai-shi/use-context-selector#readme","_id":"use-context-selector@1.3.7","_nodeVersion":"12.20.0","_npmVersion":"6.14.8","dist":{"integrity":"sha512-O94hcN9UDAPTC4Fsm3p6Og5PVlhTEeKqxJX3HuBbVSuevOSPLDZxowFUmx49/fnu9jpgY83Nd3TALJVDRtYzdQ==","shasum":"4e59270baa73417dcb0c5c6c124359fd0e8b3aaf","tarball":"https://registry.npmjs.org/use-context-selector/-/use-context-selector-1.3.7.tgz","fileCount":17,"unpackedSize":79260,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgDXyKCRA9TVsSAnZWagAAsq8P/2GabPSS1OxFT66L63IX\n5hB3SM/H0Ek4w/a1qd2P90IhRIOcA3oggGylWC0qVHsCAjGtHKMNqMmu108m\nQqCRk7tQE7Yt57YjFaXxeccGXAm+nSAZcQaLkiMsxdyeCGxines01MEJA4jA\nVejCDtY1VqXf71M0r+EA7vjZaG6wKCoLpwW6nmWKI9GIltArcC2NvHkOCVfv\n4lP3k6IOi4oTou/m4rIsM23UUhFMLmxY9Ha32lfGrF9rzX2MVZN4qbRDLAnb\nYpvjsIS/65ODqRoe+HBOPKp8DUnciYmAyedDAb2hRCjjCyWuuNmb3H8flhQd\nsGGREWbIcc5zvLUwfmy4RHc9sblGHfivn+lft/RLYAydQHPmRIkCo4EJEKIt\nAgMm8h8K2OfjYOIr5EOvfNAjD7H4hD/FmD9AtXq3KU7nGOuyWl7lhG4s/mjt\nVKi/akS1lYjFRent8dDWbQnfxNglu3OKitwg2GedaDW/n/MqXHGwwMmmJ9rv\n3lsLyoWnm0Z4IDpjq+Lm7rWFQRyn6Ov7PNbXvQB93OssJIYQV39Xz7XWWAW+\nCeIU6D5KqVrkv+Idw+2wWZfbWXpnz3tCeG6z9zRn8Wmy8Pp7PTPftt1uvNDv\nyVs19mxmvc9/XLNCri69VvDA35tJtt3xQd3szLtqRP8MhK6a1S2tB1kr7X8r\nr05k\r\n=uChL\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIAJPw5tHWff0NbvUjBtoerePAIvYq8XG4bvkwZ5GHyMDAiEAxX3f0zyiY13C5+vhqwoRuLEsGJuIt2TaSaB/r43Of84="}]},"_npmUser":{"name":"daishi","email":"daishi@axlight.com"},"directories":{},"maintainers":[{"name":"daishi","email":"daishi@axlight.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/use-context-selector_1.3.7_1611496585582_0.4983363491072659"},"_hasShrinkwrap":false},"1.3.8":{"name":"use-context-selector","description":"React useContextSelector hook in userland","version":"1.3.8","author":{"name":"Daishi Kato"},"repository":{"type":"git","url":"git+https://github.com/dai-shi/use-context-selector.git"},"source":"./src/index.ts","main":"./dist/index.umd.js","module":"./dist/index.modern.js","react-native":"./dist/index.native.modern.js","types":"./dist/src/index.d.ts","exports":{"./package.json":"./package.json",".":{"types":"./dist/src/index.d.ts","module":"./dist/index.modern.js","import":"./dist/index.modern.mjs","default":"./dist/index.umd.js"}},"sideEffects":false,"scripts":{"compile":"run-s compile:*","compile:dom":"microbundle build -f modern,umd","precompile:native":"mkdir src/native && cp src/index.ts src/native/index.ts && cp src/batchedUpdates.native.ts src/native/batchedUpdates.ts","compile:native":"microbundle build -f modern,umd -i ./src/native/index.ts -o ./dist/index.native.js","postcompile:native":"rm -r src/native","test":"run-s eslint tsc-test jest","eslint":"eslint --ext .js,.ts,.tsx --ignore-pattern dist .","jest":"jest","tsc-test":"tsc --project . --noEmit","apidoc":"documentation readme --section API --markdown-toc false --parse-extension ts src/*.ts","examples:01_minimal":"DIR=01_minimal EXT=js webpack-dev-server","examples:02_typescript":"DIR=02_typescript webpack-dev-server"},"jest":{"testEnvironment":"jsdom","preset":"ts-jest/presets/js-with-ts"},"keywords":["react","context","hooks"],"license":"MIT","dependencies":{},"devDependencies":{"@testing-library/react":"^12.1.0","@types/jest":"^27.0.1","@types/react":"^17.0.21","@types/react-dom":"^17.0.9","@types/scheduler":"^0.16.2","@typescript-eslint/eslint-plugin":"^4.31.1","@typescript-eslint/parser":"^4.31.1","documentation":"^13.2.5","eslint":"^7.32.0","eslint-config-airbnb":"^18.2.1","eslint-plugin-import":"^2.24.2","eslint-plugin-jsx-a11y":"^6.4.1","eslint-plugin-react":"^7.25.2","eslint-plugin-react-hooks":"^4.2.0","html-webpack-plugin":"^5.3.2","jest":"^27.2.0","microbundle":"^0.13.3","npm-run-all":"^4.1.5","react":"^17.0.1","react-dom":"^17.0.1","scheduler":"^0.19.1","ts-jest":"^27.0.5","ts-loader":"^9.2.5","typescript":"^4.4.3","webpack":"^5.53.0","webpack-cli":"^4.8.0","webpack-dev-server":"^4.2.1"},"peerDependencies":{"react":">=16.8.0","react-dom":"*","react-native":"*","scheduler":">=0.19.0"},"peerDependenciesMeta":{"react-dom":{"optional":true},"react-native":{"optional":true}},"gitHead":"1b7023a6e81b49d09691365fc9c015b6f8eb38bf","bugs":{"url":"https://github.com/dai-shi/use-context-selector/issues"},"homepage":"https://github.com/dai-shi/use-context-selector#readme","_id":"use-context-selector@1.3.8","_nodeVersion":"12.22.6","_npmVersion":"6.14.15","dist":{"integrity":"sha512-FL0gr+9AuaV1roA1FyGqebaeGE6JkfmiRkOhajrudYnuaNykzad7mZDALQWpI1gTqKykT6Ufs4L2QoCsoxr/kQ==","shasum":"dcc8327852bd2d32650e9b5a26a861ec67d85bfe","tarball":"https://registry.npmjs.org/use-context-selector/-/use-context-selector-1.3.8.tgz","fileCount":17,"unpackedSize":80541,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICzamb+XMDZLVUlobX3pG3eDku0tVAIRrM1j27DxWCwmAiBEokqYjoe+a/sYnxwgg0tkr+7wlfQxir/+IWwtJ2OBzA=="}]},"_npmUser":{"name":"daishi","email":"daishi@axlight.com"},"directories":{},"maintainers":[{"name":"daishi","email":"daishi@axlight.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/use-context-selector_1.3.8_1631934118426_0.8329533108436598"},"_hasShrinkwrap":false},"1.3.9":{"name":"use-context-selector","description":"React useContextSelector hook in userland","version":"1.3.9","author":{"name":"Daishi Kato"},"repository":{"type":"git","url":"git+https://github.com/dai-shi/use-context-selector.git"},"source":"./src/index.ts","main":"./dist/index.umd.js","module":"./dist/index.modern.js","react-native":"./dist/index.native.modern.js","types":"./dist/src/index.d.ts","exports":{"./package.json":"./package.json",".":{"types":"./dist/src/index.d.ts","module":"./dist/index.modern.js","import":"./dist/index.modern.mjs","default":"./dist/index.umd.js"}},"sideEffects":false,"scripts":{"compile":"run-s compile:*","compile:dom":"microbundle build -f modern,umd","postcompile:dom":"cp dist/index.modern.mjs dist/index.modern.js && cp dist/index.modern.mjs.map dist/index.modern.js.map","precompile:native":"mkdir src/native && cp src/index.ts src/native/index.ts && cp src/batchedUpdates.native.ts src/native/batchedUpdates.ts","compile:native":"microbundle build -f modern,umd -i ./src/native/index.ts -o ./dist/index.native.js","postcompile:native":"mv dist/index.native.modern.mjs dist/index.native.modern.js && mv dist/index.native.modern.mjs.map dist/index.native.modern.js.map && rm -r src/native","test":"run-s eslint tsc-test jest","eslint":"eslint --ext .js,.ts,.tsx --ignore-pattern dist .","jest":"jest","tsc-test":"tsc --project . --noEmit","apidoc":"documentation readme --section API --markdown-toc false --parse-extension ts src/*.ts","examples:01_minimal":"DIR=01_minimal EXT=js webpack-dev-server","examples:02_typescript":"DIR=02_typescript webpack-dev-server"},"jest":{"testEnvironment":"jsdom","preset":"ts-jest/presets/js-with-ts"},"keywords":["react","context","hooks"],"license":"MIT","dependencies":{},"devDependencies":{"@testing-library/react":"^12.1.0","@types/jest":"^27.0.1","@types/react":"^17.0.21","@types/react-dom":"^17.0.9","@types/scheduler":"^0.16.2","@typescript-eslint/eslint-plugin":"^4.31.1","@typescript-eslint/parser":"^4.31.1","documentation":"^13.2.5","eslint":"^7.32.0","eslint-config-airbnb":"^18.2.1","eslint-plugin-import":"^2.24.2","eslint-plugin-jsx-a11y":"^6.4.1","eslint-plugin-react":"^7.25.2","eslint-plugin-react-hooks":"^4.2.0","html-webpack-plugin":"^5.3.2","jest":"^27.2.0","microbundle":"^0.13.3","npm-run-all":"^4.1.5","react":"^17.0.1","react-dom":"^17.0.1","scheduler":"^0.19.1","ts-jest":"^27.0.5","ts-loader":"^9.2.5","typescript":"^4.4.3","webpack":"^5.53.0","webpack-cli":"^4.8.0","webpack-dev-server":"^4.2.1"},"peerDependencies":{"react":">=16.8.0","react-dom":"*","react-native":"*","scheduler":">=0.19.0"},"peerDependenciesMeta":{"react-dom":{"optional":true},"react-native":{"optional":true}},"gitHead":"7ca35cf68d08ba930a8b91c129ab00d1798300b9","bugs":{"url":"https://github.com/dai-shi/use-context-selector/issues"},"homepage":"https://github.com/dai-shi/use-context-selector#readme","_id":"use-context-selector@1.3.9","_nodeVersion":"12.22.6","_npmVersion":"6.14.15","dist":{"integrity":"sha512-YgzRyeFjoJXwFn2qLVAuIbV6EQ8DOuzu3SS/eiCxyAyvBhcn02jYSz8c5v22QQU3LW6Ez/Iyo62kKvS7Kdqt3A==","shasum":"d1527393839f0d790ccdd52e28e8f353b8be6c2e","tarball":"https://registry.npmjs.org/use-context-selector/-/use-context-selector-1.3.9.tgz","fileCount":19,"unpackedSize":94713,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh2/IWCRA9TVsSAnZWagAAY2wP/3JsBAirdI99MttmhU0O\nE6G4lFqx4s+62g0nvSMaFes5r1SQWlXWSC0qjfQvX48DNLy85fWdal/A52SM\nL+PwqsN+uxIxFXOUK21EeF3KOixJFlfRUxi5OrFW08tfLRXRrljQaX/aH04F\nkTnCPQeQYEdmUaPKFvMthX1Rgo8hWBMK9JbeTJaJ4ZQeIWu6MAKlqGuwrYH4\n8t6IB9V3M5GhsLQsm7NdRnG+q/M5h06oG/OxLWQDthwET6ghI0N0sFtn6NVY\n9JUilOAiG89Zdyen814ohbLEOu+lEEri5M/pUJtFyB54k8DKtpEs7Cs8Upbq\nRUDxXhp4bctLjJOqzl/On7lMzUjiK2zyNICvQfu2rLu0yZvWDGIMT8RxCBbI\n2CcwMQt5Hfisi+dKFvTBVDavZdDuIZsWFGHwVgOw7Fx66KXc5XA91xtYhNnn\nPHSG2IC3kLH6qAXqQ40AMJiSYTgtOZXfkdBVj8YzuQjZB7w/3O6LyIRIqOUm\nYKFksBE8Ixc60/eDuXTqwx9FdSNW/+lSaNAZeZVs4gk0+g24+nGzRjwRqNf6\n80geMoVnNMcWr5c3VNveJ2jmeuGZCPyGjqQe0DX03LFC/noRZSPNWT0ZOT7z\ngyTwQBOy7CftAV4bdrus6d1UteEGv/uqn9AX8a4HuDG6PPqsJl5olNg5sp0i\nVpu8\r\n=Y0DU\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQC7CLC3GBmw8F7DQwtHwbbueQukcBufSg592BnLuw0axQIgY6aG3/QmxC4mbzSSphgvzmR+3iZbEaVyHdhwZes6h1E="}]},"_npmUser":{"name":"daishi","email":"daishi@axlight.com"},"directories":{},"maintainers":[{"name":"daishi","email":"daishi@axlight.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/use-context-selector_1.3.9_1632133937647_0.3931705298601402"},"_hasShrinkwrap":false},"1.3.10":{"name":"use-context-selector","description":"React useContextSelector hook in userland","version":"1.3.10","author":{"name":"Daishi Kato"},"repository":{"type":"git","url":"git+https://github.com/dai-shi/use-context-selector.git"},"source":"./src/index.ts","main":"./dist/index.umd.js","module":"./dist/index.modern.js","react-native":"./dist/index.native.modern.js","types":"./dist/src/index.d.ts","exports":{"./package.json":"./package.json",".":{"types":"./dist/src/index.d.ts","module":"./dist/index.modern.js","import":"./dist/index.modern.mjs","default":"./dist/index.umd.js"}},"sideEffects":false,"scripts":{"compile":"run-s compile:*","compile:dom":"microbundle build -f modern,umd --globals react=React,react-dom=ReactDOM","postcompile:dom":"cp dist/index.modern.mjs dist/index.modern.js && cp dist/index.modern.mjs.map dist/index.modern.js.map","precompile:native":"mkdir src/native && cp src/index.ts src/native/index.ts && cp src/batchedUpdates.native.ts src/native/batchedUpdates.ts","compile:native":"microbundle build -f modern,umd -i ./src/native/index.ts -o ./dist/index.native.js","postcompile:native":"mv dist/index.native.modern.mjs dist/index.native.modern.js && mv dist/index.native.modern.mjs.map dist/index.native.modern.js.map && rm -r src/native","test":"run-s eslint tsc-test jest","eslint":"eslint --ext .js,.ts,.tsx --ignore-pattern dist .","jest":"jest","tsc-test":"tsc --project . --noEmit","apidoc":"documentation readme --section API --markdown-toc false --parse-extension ts --require-extension ts src/*.ts","examples:01_minimal":"DIR=01_minimal EXT=js webpack serve","examples:02_typescript":"DIR=02_typescript webpack serve"},"jest":{"testEnvironment":"jsdom","preset":"ts-jest/presets/js-with-ts"},"keywords":["react","context","hooks"],"license":"MIT","dependencies":{},"devDependencies":{"@testing-library/react":"^13.0.0","@types/jest":"^27.4.1","@types/react":"^18.0.0","@types/react-dom":"^18.0.0","@types/scheduler":"^0.16.2","@typescript-eslint/eslint-plugin":"^5.18.0","@typescript-eslint/parser":"^5.18.0","documentation":"^13.2.5","eslint":"^8.12.0","eslint-config-airbnb":"^19.0.4","eslint-plugin-import":"^2.26.0","eslint-plugin-jsx-a11y":"^6.5.1","eslint-plugin-react":"^7.29.4","eslint-plugin-react-hooks":"^4.4.0","html-webpack-plugin":"^5.5.0","jest":"^27.5.1","microbundle":"^0.14.2","npm-run-all":"^4.1.5","react":"^18.0.0","react-dom":"^18.0.0","scheduler":"^0.21.0","ts-jest":"^27.1.4","ts-loader":"^9.2.8","typescript":"^4.6.3","webpack":"^5.72.0","webpack-cli":"^4.9.2","webpack-dev-server":"^4.8.1"},"peerDependencies":{"react":">=16.8.0","react-dom":"*","react-native":"*","scheduler":">=0.19.0"},"peerDependenciesMeta":{"react-dom":{"optional":true},"react-native":{"optional":true}},"gitHead":"b6f203f45a399d3663e81724988792592fe4bc52","bugs":{"url":"https://github.com/dai-shi/use-context-selector/issues"},"homepage":"https://github.com/dai-shi/use-context-selector#readme","_id":"use-context-selector@1.3.10","_nodeVersion":"12.22.11","_npmVersion":"6.14.16","dist":{"integrity":"sha512-xprS9YQ0F56IPTOjev+Lm+TWZD7Pa20+slBeaClt4YtOOoHKFOF3A9Cfr7LDcX2QIZ9VTyxXCnA6/WhL4Cm47g==","shasum":"8cda435e2ebd352518fbccdcf05b9787cbbd6773","tarball":"https://registry.npmjs.org/use-context-selector/-/use-context-selector-1.3.10.tgz","fileCount":19,"unpackedSize":96539,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDLGUkkFkdiSf9XAZhr2XCVwnxlcmKq4npiexo4suGmsAiEAvHYCylnVU1AkHvM+eIPR9NcXeNmhieMH7qfvlYl4qWA="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiVMhiACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrZNA/7BQsJ42dMNV3ECvf7GcsurnlrR8I5ERFSenAcbSG1Ym15VylM\r\ndiffhXxy+lc1JHQL9dsuLdzsKThwCLhHNb2IQf6O3Py6gtvjZytrAEo2GMtp\r\nsvXxyJL36o3FDJy2oG5Q3AABxO7q8t4jjOtNxXC9kGhjMYWUz5fqoDRbgKjh\r\n1sLHo0lVveI1SIcijHLZKNgnFh86J8W4INJmoniwFQIN73TvJJqZ7UEoLJHk\r\nUIwLIG5kbHhNNmgxVB4bYUw2PsFaN87TCf8WMwX82XjyCbRPnb/vzrZbFFEZ\r\nCI8Sy1DvxwSswGngZV1biiw2wrPnAAaooh325iEIxnKIjXgKPiHlPCn6VPe+\r\nP+Vilem9SvKgiYZMUNkIPePxPpK/hPwcI39/5NLU7HnIyqU9kIKyMFLqnfOx\r\n8JTJraY/t/j4BPaBeDoAftXSaLLoEupgTlMulc0zYSeIVaATK0Ga+0q48m9O\r\nv4i2qfRKJ2jUtX/QvHYRH8fzQnycWKmHNOIAZ06nR/8HQOfGKHvAnB2KE3ii\r\n6YvoYFx+CyYEqu+/xfYgHXtFiipTiwWVmov5yjY6/yhaFBma/8ReEq0FL2eE\r\nWEIJQZX28Ubg6wiTdQmBXIy2IwskMZ0J54bwfNCXBqXFekho8NR2B0MpGksN\r\n9fmDQ/Xh7WgX2XWkg4OU7IuyRt5ZnWSC6fA=\r\n=aw4W\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"daishi","email":"daishi@axlight.com"},"directories":{},"maintainers":[{"name":"daishi","email":"daishi@axlight.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/use-context-selector_1.3.10_1649723489539_0.5443743243609362"},"_hasShrinkwrap":false},"1.4.0":{"name":"use-context-selector","description":"React useContextSelector hook in userland","version":"1.4.0","author":{"name":"Daishi Kato"},"repository":{"type":"git","url":"git+https://github.com/dai-shi/use-context-selector.git"},"source":"./src/index.ts","main":"./dist/index.umd.js","module":"./dist/index.modern.js","react-native":"./dist/index.native.modern.js","types":"./dist/src/index.d.ts","exports":{"./package.json":"./package.json",".":{"types":"./dist/src/index.d.ts","module":"./dist/index.modern.js","import":"./dist/index.modern.mjs","default":"./dist/index.umd.js"}},"sideEffects":false,"scripts":{"compile":"run-s compile:*","compile:dom":"microbundle build -f modern,umd --globals react=React,react-dom=ReactDOM","postcompile:dom":"cp dist/index.modern.js dist/index.modern.mjs && cp dist/index.modern.js.map dist/index.modern.mjs.map","precompile:native":"mkdir src/native && cp src/index.ts src/native/index.ts && cp src/batchedUpdates.native.ts src/native/batchedUpdates.ts","compile:native":"microbundle build -f modern,umd -i ./src/native/index.ts -o ./dist/index.native.js","postcompile:native":"mv dist/index.native.modern.js dist/index.native.modern.mjs && mv dist/index.native.modern.js.map dist/index.native.modern.mjs.map && rm -r src/native","test":"run-s eslint tsc-test jest","eslint":"eslint --ext .js,.ts,.tsx --ignore-pattern dist .","jest":"jest","tsc-test":"tsc --project . --noEmit","apidoc":"documentation readme --section API --markdown-toc false --parse-extension ts --require-extension ts src/*.ts","examples:01_minimal":"DIR=01_minimal EXT=js webpack serve","examples:02_typescript":"DIR=02_typescript webpack serve","examples:03_suspense":"DIR=03_suspense webpack serve"},"jest":{"testEnvironment":"jsdom","preset":"ts-jest/presets/js-with-ts"},"keywords":["react","context","hooks"],"license":"MIT","dependencies":{},"devDependencies":{"@testing-library/react":"^13.2.0","@types/jest":"^27.5.0","@types/react":"^18.0.9","@types/react-dom":"^18.0.3","@types/scheduler":"^0.16.2","@typescript-eslint/eslint-plugin":"^5.23.0","@typescript-eslint/parser":"^5.23.0","documentation":"^13.2.5","eslint":"^8.15.0","eslint-config-airbnb":"^19.0.4","eslint-plugin-import":"^2.26.0","eslint-plugin-jsx-a11y":"^6.5.1","eslint-plugin-react":"^7.29.4","eslint-plugin-react-hooks":"^4.5.0","html-webpack-plugin":"^5.5.0","jest":"^28.1.0","jest-environment-jsdom":"^28.1.0","microbundle":"^0.15.0","npm-run-all":"^4.1.5","react":"^18.1.0","react-dom":"^18.1.0","scheduler":"^0.22.0","ts-jest":"^28.0.2","ts-loader":"^9.3.0","typescript":"^4.6.4","webpack":"^5.72.1","webpack-cli":"^4.9.2","webpack-dev-server":"^4.9.0"},"peerDependencies":{"react":">=16.8.0","react-dom":"*","react-native":"*","scheduler":">=0.19.0"},"peerDependenciesMeta":{"react-dom":{"optional":true},"react-native":{"optional":true}},"gitHead":"37ee60e882a0dc26d8e3bfeef4ea339bac96b6bf","bugs":{"url":"https://github.com/dai-shi/use-context-selector/issues"},"homepage":"https://github.com/dai-shi/use-context-selector#readme","_id":"use-context-selector@1.4.0","_nodeVersion":"12.22.12","_npmVersion":"6.14.16","dist":{"integrity":"sha512-1vaCjBq/ryq9y79qwh1tkqrUNLYlSLXNHClUkpgBWPvnUV5jqAJvRSsK77mG80uBwNF9HF/kuRyPtXEQhlJ4Jw==","shasum":"fd46afe322e4f7e2d8fba91d806af075d646ef85","tarball":"https://registry.npmjs.org/use-context-selector/-/use-context-selector-1.4.0.tgz","fileCount":19,"unpackedSize":104486,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIClfzHlDRSoHc8OPCXpkKukni2PrN9ZaV4TPca49WZVGAiBMfE/88owcFeYlDhOIEK/6KrdL7tY0IDWUO9vG+sVwlQ=="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJigvNZACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoK0A/+IoWsrkclpJZQypfKiVxA60dAsQ7TCKkTTUt4thxvWPfwMYHC\r\nfqT7EfvumKi/dKGdBDO8+9BZjzlAOYc8Scl1ssESXECwXUoG7sk4hzZxu7Y+\r\nN/wbsJ/oyGVDDRh/qK0VWA0uenx+Vs6fY+n+c+/I9S1UoBMFxlRN7ZmMWBNf\r\nyBnMNQ89DgH6n5/zyrYiRxW2ebbv7xIFqx+hoZtup1py6cllTio3py+rzESN\r\nIjhBq98fhdY1zsYTXxnif3ET4LJNXseYeNK5FcW5hxBQbFbsFtQLJ6GLCb6Y\r\nPEopLvuX81pog/vKoPOtd8icmvhPT65bg1bl2BJxBP8BI26qa7YVdcelhGWg\r\noNIkzNvojg7fzXozeMzF8LCTItqG2Zkk+mM4TnOQBDpg/VpwX03030IT11xi\r\nBJ9hdcGmJSquEQlRx4m7Nnri5XwN+L934oMjKJHWLw9/huJXOzGrMf4IOf2s\r\nG/hV2W9YobjfflEKKn9S54fPoK+iXkPSAH3q0nECgnSypw8MAiE59HfCgRzM\r\nq8O/X6jnu1qbYk+/N4DNz/DeSk2I+yBeX8qEggU8KkdJ4I63pWjH/isUXtfk\r\neWu3nrCPaiPe/dA2C4jMsL/4fhNlc7AKmSjAdOAMOedV0JZIYVryjLFZM1rY\r\ncLClOrmbjmADVmw1+YCg2lLIuTnq7UgNxFM=\r\n=MQmf\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"daishi","email":"daishi@axlight.com"},"directories":{},"maintainers":[{"name":"daishi","email":"daishi@axlight.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/use-context-selector_1.4.0_1652749145666_0.10062672886622614"},"_hasShrinkwrap":false},"1.4.1":{"name":"use-context-selector","description":"React useContextSelector hook in userland","version":"1.4.1","author":{"name":"Daishi Kato"},"repository":{"type":"git","url":"git+https://github.com/dai-shi/use-context-selector.git"},"source":"./src/index.ts","main":"./dist/index.umd.js","module":"./dist/index.modern.js","react-native":"./dist/index.native.modern.js","types":"./dist/src/index.d.ts","exports":{"./package.json":"./package.json",".":{"types":"./dist/src/index.d.ts","module":"./dist/index.modern.js","import":"./dist/index.modern.mjs","default":"./dist/index.umd.js"}},"sideEffects":false,"scripts":{"compile":"run-s compile:*","compile:dom":"microbundle build -f modern,umd --globals react=React,react-dom=ReactDOM","postcompile:dom":"cp dist/index.modern.js dist/index.modern.mjs && cp dist/index.modern.js.map dist/index.modern.mjs.map","precompile:native":"mkdir src/native && cp src/index.ts src/native/index.ts && cp src/batchedUpdates.native.ts src/native/batchedUpdates.ts","compile:native":"microbundle build -f modern,umd -i ./src/native/index.ts -o ./dist/index.native.js","postcompile:native":"rm -r src/native","test":"run-s eslint tsc-test jest","eslint":"eslint --ext .js,.ts,.tsx --ignore-pattern dist .","jest":"jest","tsc-test":"tsc --project . --noEmit","apidoc":"documentation readme --section API --markdown-toc false --parse-extension ts --require-extension ts src/*.ts","examples:01_minimal":"DIR=01_minimal EXT=js webpack serve","examples:02_typescript":"DIR=02_typescript webpack serve","examples:03_suspense":"DIR=03_suspense webpack serve"},"jest":{"testEnvironment":"jsdom","preset":"ts-jest/presets/js-with-ts"},"keywords":["react","context","hooks"],"license":"MIT","dependencies":{},"devDependencies":{"@testing-library/react":"^13.3.0","@types/jest":"^28.1.1","@types/react":"^18.0.12","@types/react-dom":"^18.0.5","@types/scheduler":"^0.16.2","@typescript-eslint/eslint-plugin":"^5.27.1","@typescript-eslint/parser":"^5.27.1","documentation":"^13.2.5","eslint":"^8.17.0","eslint-config-airbnb":"^19.0.4","eslint-plugin-import":"^2.26.0","eslint-plugin-jsx-a11y":"^6.5.1","eslint-plugin-react":"^7.30.0","eslint-plugin-react-hooks":"^4.5.0","html-webpack-plugin":"^5.5.0","jest":"^28.1.1","jest-environment-jsdom":"^28.1.1","microbundle":"^0.15.0","npm-run-all":"^4.1.5","react":"^18.1.0","react-dom":"^18.1.0","scheduler":"^0.22.0","ts-jest":"^28.0.4","ts-loader":"^9.3.0","typescript":"^4.7.3","webpack":"^5.73.0","webpack-cli":"^4.9.2","webpack-dev-server":"^4.9.2"},"peerDependencies":{"react":">=16.8.0","react-dom":"*","react-native":"*","scheduler":">=0.19.0"},"peerDependenciesMeta":{"react-dom":{"optional":true},"react-native":{"optional":true}},"gitHead":"d8aa3cc21a0df13e5efc51cde704e85696c687a1","bugs":{"url":"https://github.com/dai-shi/use-context-selector/issues"},"homepage":"https://github.com/dai-shi/use-context-selector#readme","_id":"use-context-selector@1.4.1","_nodeVersion":"12.22.12","_npmVersion":"6.14.16","dist":{"integrity":"sha512-Io2ArvcRO+6MWIhkdfMFt+WKQX+Vb++W8DS2l03z/Vw/rz3BclKpM0ynr4LYGyU85Eke+Yx5oIhTY++QR0ZDoA==","shasum":"eb96279965846b72915d7f899b8e6ef1d768b0ae","tarball":"https://registry.npmjs.org/use-context-selector/-/use-context-selector-1.4.1.tgz","fileCount":19,"unpackedSize":104307,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCC1KtrIPSVqggemzEdBFCGPc6RmIOoLsj346rf89bEsQIhAODSN4+ZLlSRLkpyt8/HFnRnLOjLeAhYcm1SxmA0mXif"}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJin9zAACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmp52g/9HQQLFTsnaAaopzsYD0RmaJoTFxIhbMNGNU1htO0K6oCZadFt\r\n3FULRggQia9AOoEX7BOQEjiMQ1+dkN+di+zmVmYQgYLFfKusbchouzaJ2JNw\r\nDtVsG4HhmzqEsbH294moRJWPyJ7KBJ54iYDoECvHJcA/NyXUBArqxeT3Wy0R\r\nFcRCVFLyFtUfuiZIku4ythNzl+GviL6/gbrxLz8Ndk733FG3v+5682NfTskG\r\n1qo/5EsBdeCrNAdlE8Rwh/Eli3jQmzDD8dRCvf6KTPe0Y0tmPmqga+Vmmhru\r\nC7KC+A+EPxB1r3gXxNwdfc+jxehAil2QUaOxUuwGsm8Jli6pMLnTB6UeDEcO\r\nGIMjocmUjcR9apZdONQLvA+9bhoc73o+0VutA7Y522ygz/Ew1uISn7xvoKXn\r\nUhtB+I2gwZUdSeVWYDGj/oPIuWKc1wmS1nP5Znda+SAck6rPmlM9Iq4p1Oe/\r\nnDcjBfr0N4iNxUg0zxWf6NGW5X+dKhneD/kwh+5VWdcr98/A3wwzE/aWzRvu\r\ni7Vsyz7Mw4tY0A0HPEp3FKucLqz1YwjNQOsVhnzPuTnjCIKj296W5HGGdWRg\r\nJf2p/Mixrb1PYsu4Blgk23TdscDaZY7exrbA4mAcbgJy/lL/39T/g2P5Jr9p\r\n3oIN0Kx6Ppl437a7FJZqZA+32tbeWG5Ln2I=\r\n=FjEb\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"daishi","email":"daishi@axlight.com"},"directories":{},"maintainers":[{"name":"daishi","email":"daishi@axlight.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/use-context-selector_1.4.1_1654643904035_0.24022537115862397"},"_hasShrinkwrap":false},"1.4.2":{"name":"use-context-selector","description":"React useContextSelector hook in userland","version":"1.4.2","author":{"name":"Daishi Kato"},"repository":{"type":"git","url":"git+https://github.com/dai-shi/use-context-selector.git"},"source":"./src/index.ts","main":"./dist/index.umd.js","module":"./dist/index.modern.js","react-native":"./dist/index.native.modern.js","types":"./dist/src/index.d.ts","exports":{"./package.json":"./package.json",".":{"types":"./dist/src/index.d.ts","import":"./dist/index.modern.mjs","default":"./dist/index.umd.js"}},"sideEffects":false,"scripts":{"compile":"run-s compile:*","compile:dom":"microbundle build -f modern,umd --globals react=React,react-dom=ReactDOM --no-compress","postcompile:dom":"cp dist/index.modern.mjs dist/index.modern.js && cp dist/index.modern.mjs.map dist/index.modern.js.map","precompile:native":"mkdir src/native && cp src/index.ts src/native/index.ts && cp src/batchedUpdates.native.ts src/native/batchedUpdates.ts","compile:native":"microbundle build -f modern,umd -i ./src/native/index.ts -o ./dist/index.native.js --no-compress","postcompile:native":"rm -r src/native","test":"run-s eslint tsc-test jest","eslint":"eslint --ext .js,.ts,.tsx --ignore-pattern dist .","jest":"jest","tsc-test":"tsc --project . --noEmit","apidoc":"documentation readme --section API --markdown-toc false --parse-extension ts --require-extension ts src/*.ts","examples:01_minimal":"DIR=01_minimal EXT=js webpack serve","examples:02_typescript":"DIR=02_typescript webpack serve","examples:03_suspense":"DIR=03_suspense webpack serve"},"jest":{"testEnvironment":"jsdom","preset":"ts-jest/presets/js-with-ts"},"keywords":["react","context","hooks"],"license":"MIT","devDependencies":{"@testing-library/react":"^14.2.1","@types/jest":"^29.5.12","@types/node":"^20.11.24","@types/react":"^18.2.61","@types/react-dom":"^18.2.19","@types/scheduler":"^0.16.8","@typescript-eslint/eslint-plugin":"^7.1.0","@typescript-eslint/parser":"^7.1.0","documentation":"^14.0.3","eslint":"^8.57.0","eslint-config-airbnb":"^19.0.4","eslint-plugin-import":"^2.29.1","eslint-plugin-jsx-a11y":"^6.8.0","eslint-plugin-react":"^7.33.2","eslint-plugin-react-hooks":"^4.6.0","html-webpack-plugin":"^5.6.0","jest":"^29.7.0","jest-environment-jsdom":"^29.7.0","microbundle":"^0.15.1","npm-run-all":"^4.1.5","react":"^18.2.0","react-dom":"^18.2.0","scheduler":"^0.23.0","ts-jest":"^29.1.2","ts-loader":"^9.5.1","typescript":"^5.3.3","webpack":"^5.90.3","webpack-cli":"^5.1.4","webpack-dev-server":"^5.0.2"},"peerDependencies":{"react":">=16.8.0","react-dom":"*","react-native":"*","scheduler":">=0.19.0"},"peerDependenciesMeta":{"react-dom":{"optional":true},"react-native":{"optional":true}},"_id":"use-context-selector@1.4.2","gitHead":"ce0bf5d97538a121f55de33b241c51d8a08742cc","bugs":{"url":"https://github.com/dai-shi/use-context-selector/issues"},"homepage":"https://github.com/dai-shi/use-context-selector#readme","_nodeVersion":"18.19.1","_npmVersion":"10.2.4","dist":{"integrity":"sha512-OZvd4TWirCMOwIwFlQFnECIyEGb3fvSrd71A8sGWiAPl6SIJTS60Ho+WnAr67T6/JedvlperiReCM5n9mnM3fQ==","shasum":"168aa55fb9403bc7cc6c2c5c4ff8ca1118b0d9cd","tarball":"https://registry.npmjs.org/use-context-selector/-/use-context-selector-1.4.2.tgz","fileCount":18,"unpackedSize":152668,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDtyxzbUJ7SvtfZI7qHV7kVeBnxSXb34TRV+7AMtMGeZgIgA8ZbvCrzoKtdn01pPlokOmWBWACBYikNr6nYv3kmNqw="}]},"_npmUser":{"name":"daishi","email":"daishi@axlight.com"},"directories":{},"maintainers":[{"name":"daishi","email":"daishi@axlight.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/use-context-selector_1.4.2_1709338964883_0.7038148742302597"},"_hasShrinkwrap":false},"1.4.3":{"name":"use-context-selector","description":"React useContextSelector hook in userland","version":"1.4.3","author":{"name":"Daishi Kato"},"repository":{"type":"git","url":"git+https://github.com/dai-shi/use-context-selector.git"},"source":"./src/index.ts","main":"./dist/index.umd.js","module":"./dist/index.modern.js","types":"./dist/src/index.d.ts","exports":{"./package.json":"./package.json",".":{"types":"./dist/src/index.d.ts","react-native":"./dist/index.native.modern.mjs","import":"./dist/index.modern.mjs","default":"./dist/index.umd.js"}},"sideEffects":false,"scripts":{"compile":"run-s compile:*","compile:dom":"microbundle build -f modern,umd --globals react=React,react-dom=ReactDOM --no-compress","postcompile:dom":"cp dist/index.modern.mjs dist/index.modern.js && cp dist/index.modern.mjs.map dist/index.modern.js.map","precompile:native":"mkdir src/native && cp src/index.ts src/native/index.ts && cp src/batchedUpdates.native.ts src/native/batchedUpdates.ts","compile:native":"microbundle build -f modern,umd -i ./src/native/index.ts -o ./dist/index.native.js --no-compress","postcompile:native":"rm -r src/native","test":"run-s eslint tsc-test jest","eslint":"eslint --ext .js,.ts,.tsx --ignore-pattern dist .","jest":"jest","tsc-test":"tsc --project . --noEmit","apidoc":"documentation readme --section API --markdown-toc false --parse-extension ts --require-extension ts src/*.ts","examples:01_minimal":"DIR=01_minimal EXT=js webpack serve","examples:02_typescript":"DIR=02_typescript webpack serve","examples:03_suspense":"DIR=03_suspense webpack serve"},"jest":{"testEnvironment":"jsdom","preset":"ts-jest/presets/js-with-ts"},"keywords":["react","context","hooks"],"license":"MIT","devDependencies":{"@testing-library/react":"^14.2.1","@types/jest":"^29.5.12","@types/node":"^20.11.24","@types/react":"^18.2.61","@types/react-dom":"^18.2.19","@types/scheduler":"^0.16.8","@typescript-eslint/eslint-plugin":"^7.1.0","@typescript-eslint/parser":"^7.1.0","documentation":"^14.0.3","eslint":"^8.57.0","eslint-config-airbnb":"^19.0.4","eslint-plugin-import":"^2.29.1","eslint-plugin-jsx-a11y":"^6.8.0","eslint-plugin-react":"^7.33.2","eslint-plugin-react-hooks":"^4.6.0","html-webpack-plugin":"^5.6.0","jest":"^29.7.0","jest-environment-jsdom":"^29.7.0","microbundle":"^0.15.1","npm-run-all":"^4.1.5","react":"^18.2.0","react-dom":"^18.2.0","scheduler":"^0.23.0","ts-jest":"^29.1.2","ts-loader":"^9.5.1","typescript":"^5.3.3","webpack":"^5.90.3","webpack-cli":"^5.1.4","webpack-dev-server":"^5.0.2"},"peerDependencies":{"react":">=16.8.0","react-dom":"*","react-native":"*","scheduler":">=0.19.0"},"peerDependenciesMeta":{"react-dom":{"optional":true},"react-native":{"optional":true}},"_id":"use-context-selector@1.4.3","gitHead":"ed5960eeaf574a091f14a7207a800526f911b93a","bugs":{"url":"https://github.com/dai-shi/use-context-selector/issues"},"homepage":"https://github.com/dai-shi/use-context-selector#readme","_nodeVersion":"18.19.1","_npmVersion":"10.2.4","dist":{"integrity":"sha512-rFo2z14XipT7XvXfw0lB/GCbxaKp9LCJoW96VWbZTlzoe4/E1dlqufv8xDvXRMPh3aIjFtNlwoaofuKX1UwUNw==","shasum":"cb13afa834331d689d6b045917d8b7dfdd7d8047","tarball":"https://registry.npmjs.org/use-context-selector/-/use-context-selector-1.4.3.tgz","fileCount":18,"unpackedSize":152673,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDJZaZiLDUf/zxBdmV1s7j/wkKsYgmEIUNSX2C0Gmr1RAIgQ00JqzmJNoy1aIIqvvKuhFVKtcEa9J8AJT2F3BWvPOo="}]},"_npmUser":{"name":"daishi","email":"daishi@axlight.com"},"directories":{},"maintainers":[{"name":"daishi","email":"daishi@axlight.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/use-context-selector_1.4.3_1709689799487_0.9303863129519563"},"_hasShrinkwrap":false},"1.4.4":{"name":"use-context-selector","description":"React useContextSelector hook in userland","version":"1.4.4","author":{"name":"Daishi Kato"},"repository":{"type":"git","url":"git+https://github.com/dai-shi/use-context-selector.git"},"source":"./src/index.ts","main":"./dist/index.umd.js","module":"./dist/index.modern.js","react-native":"./dist/index.native.modern.mjs","types":"./dist/src/index.d.ts","exports":{"./package.json":"./package.json",".":{"types":"./dist/src/index.d.ts","react-native":"./dist/index.native.modern.mjs","import":"./dist/index.modern.mjs","default":"./dist/index.umd.js"}},"sideEffects":false,"scripts":{"compile":"run-s compile:*","compile:dom":"microbundle build -f modern,umd --globals react=React,react-dom=ReactDOM --no-compress","postcompile:dom":"cp dist/index.modern.mjs dist/index.modern.js && cp dist/index.modern.mjs.map dist/index.modern.js.map","precompile:native":"mkdir src/native && cp src/index.ts src/native/index.ts && cp src/batchedUpdates.native.ts src/native/batchedUpdates.ts","compile:native":"microbundle build -f modern,umd -i ./src/native/index.ts -o ./dist/index.native.js --no-compress","postcompile:native":"rm -r src/native","test":"run-s eslint tsc-test jest","eslint":"eslint --ext .js,.ts,.tsx --ignore-pattern dist .","jest":"jest","tsc-test":"tsc --project . --noEmit","apidoc":"documentation readme --section API --markdown-toc false --parse-extension ts --require-extension ts src/*.ts","examples:01_minimal":"DIR=01_minimal EXT=js webpack serve","examples:02_typescript":"DIR=02_typescript webpack serve","examples:03_suspense":"DIR=03_suspense webpack serve"},"jest":{"testEnvironment":"jsdom","preset":"ts-jest/presets/js-with-ts"},"keywords":["react","context","hooks"],"license":"MIT","devDependencies":{"@testing-library/react":"^14.2.1","@types/jest":"^29.5.12","@types/node":"^20.11.24","@types/react":"^18.2.61","@types/react-dom":"^18.2.19","@types/scheduler":"^0.16.8","@typescript-eslint/eslint-plugin":"^7.1.0","@typescript-eslint/parser":"^7.1.0","documentation":"^14.0.3","eslint":"^8.57.0","eslint-config-airbnb":"^19.0.4","eslint-plugin-import":"^2.29.1","eslint-plugin-jsx-a11y":"^6.8.0","eslint-plugin-react":"^7.33.2","eslint-plugin-react-hooks":"^4.6.0","html-webpack-plugin":"^5.6.0","jest":"^29.7.0","jest-environment-jsdom":"^29.7.0","microbundle":"^0.15.1","npm-run-all":"^4.1.5","react":"^18.2.0","react-dom":"^18.2.0","scheduler":"^0.23.0","ts-jest":"^29.1.2","ts-loader":"^9.5.1","typescript":"^5.3.3","webpack":"^5.90.3","webpack-cli":"^5.1.4","webpack-dev-server":"^5.0.2"},"peerDependencies":{"react":">=16.8.0","react-dom":"*","react-native":"*","scheduler":">=0.19.0"},"peerDependenciesMeta":{"react-dom":{"optional":true},"react-native":{"optional":true}},"_id":"use-context-selector@1.4.4","gitHead":"73ac3ecabdb4aa16f8486f0280df4b5f7cb99410","bugs":{"url":"https://github.com/dai-shi/use-context-selector/issues"},"homepage":"https://github.com/dai-shi/use-context-selector#readme","_nodeVersion":"18.19.1","_npmVersion":"10.2.4","dist":{"integrity":"sha512-pS790zwGxxe59GoBha3QYOwk8AFGp4DN6DOtH+eoqVmgBBRXVx4IlPDhJmmMiNQAgUaLlP+58aqRC3A4rdaSjg==","shasum":"f5d65c7fcd78f994cb33cacd57651007a40595c0","tarball":"https://registry.npmjs.org/use-context-selector/-/use-context-selector-1.4.4.tgz","fileCount":18,"unpackedSize":152725,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDMSJYa6YNBUUFsRCkf2gtrWKynercWo2egFhuI0hsCNgIhAK2+mIYYC7GI+kRhcPZgjsGcY5x36WXuEUSdPVF/vlMA"}]},"_npmUser":{"name":"daishi","email":"daishi@axlight.com"},"directories":{},"maintainers":[{"name":"daishi","email":"daishi@axlight.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/use-context-selector_1.4.4_1709904938316_0.8299569308795569"},"_hasShrinkwrap":false},"2.0.0-beta.0":{"name":"use-context-selector","description":"React useContextSelector hook in userland","version":"2.0.0-beta.0","publishConfig":{"tag":"next"},"type":"module","author":{"name":"Daishi Kato"},"repository":{"type":"git","url":"git+https://github.com/dai-shi/use-context-selector.git"},"source":"./src/index.ts","main":"./dist/index.js","types":"./dist/index.d.ts","exports":{"./package.json":"./package.json",".":{"require":{"types":"./dist/cjs/index.d.ts","default":"./dist/cjs/index.js"},"default":{"types":"./dist/index.d.ts","default":"./dist/index.js"}}},"sideEffects":false,"packageManager":"pnpm@8.15.0","scripts":{"compile":"rm -rf dist && pnpm run '/^compile:.*/'","compile:esm":"tsc -p tsconfig.esm.json","compile:cjs":"tsc -p tsconfig.cjs.json && echo '{\"type\":\"commonjs\"}' > dist/cjs/package.json","test":"pnpm run '/^test:.*/'","test:format":"prettier -c .","test:lint":"eslint .","test:types":"tsc -p . --noEmit","test:types:examples":"tsc -p examples --noEmit","test:spec":"vitest run","apidoc":"documentation readme src/index.ts --section API --markdown-toc false --parse-extension ts --require-extension ts","examples:01_counter":"DIR=01_counter vite","examples:02_person":"DIR=02_person vite","examples:03_suspense":"DIR=03_suspense vite"},"keywords":["react","context","hooks"],"license":"MIT","prettier":{"singleQuote":true},"devDependencies":{"@testing-library/jest-dom":"^6.4.2","@testing-library/react":"^15.0.5","@testing-library/user-event":"^14.5.2","@types/node":"^20.12.7","@types/react":"^18.3.1","@types/react-dom":"^18.3.0","@types/scheduler":"^0.23.0","@typescript-eslint/eslint-plugin":"^7.7.1","@typescript-eslint/parser":"^7.7.1","documentation":"^14.0.3","eslint":"^8.57.0","eslint-config-prettier":"^9.1.0","eslint-import-resolver-typescript":"^3.6.1","eslint-plugin-import":"^2.29.1","eslint-plugin-jsx-a11y":"^6.8.0","eslint-plugin-react":"^7.34.1","eslint-plugin-react-hooks":"^4.6.2","happy-dom":"^14.7.1","prettier":"^3.2.5","react":"^18.3.1","react-dom":"^18.3.1","scheduler":"^0.23.2","ts-expect":"^1.3.0","typescript":"^5.4.5","vite":"^5.2.10","vitest":"^1.5.2"},"peerDependencies":{"react":">=18.0.0","scheduler":">=0.19.0"},"_id":"use-context-selector@2.0.0-beta.0","readme":"# use-context-selector\n\n[![CI](https://img.shields.io/github/actions/workflow/status/dai-shi/use-context-selector/ci.yml?branch=main)](https://github.com/dai-shi/use-context-selector/actions?query=workflow%3ACI)\n[![npm](https://img.shields.io/npm/v/use-context-selector)](https://www.npmjs.com/package/use-context-selector)\n[![size](https://img.shields.io/bundlephobia/minzip/use-context-selector)](https://bundlephobia.com/result?p=use-context-selector)\n[![discord](https://img.shields.io/discord/627656437971288081)](https://discord.gg/MrQdmzd)\n\nReact useContextSelector hook in userland\n\n## Introduction\n\nReact Context and useContext is often used to avoid prop drilling,\nhowever it's known that there's a performance issue.\nWhen a context value is changed, all components that useContext\nwill re-render.\n\nTo solve this issue,\n[useContextSelector](https://github.com/reactjs/rfcs/pull/119)\nis proposed and later proposed\n[Speculative Mode](https://github.com/reactjs/rfcs/pull/150)\nwith context selector support.\nThis library provides the API in userland.\n\nPrior to v1.3, it uses `changedBits=0` feature to stop propagation,\nv1.3 no longer depends on this undocumented feature.\n\n## Install\n\nThis package requires some peer dependencies, which you need to install by yourself.\n\n```bash\nyarn add use-context-selector react scheduler\n```\n\nNotes for library authors:\n\nPlease do not forget to keep `\"peerDependencies\"` and\nnote instructions to let users to install peer dependencies.\n\n## Technical memo\n\nTo make it work like original React context, it uses\n[useReducer cheat mode](https://overreacted.io/a-complete-guide-to-useeffect/#why-usereducer-is-the-cheat-mode-of-hooks) intentionally.\n\nIt also requires `useContextUpdate` to behave better in concurrent rendering.\nIts usage is optional and only required if the default behavior is unexpected.\n\n## Usage\n\n```javascript\nimport { useState } from 'react';\nimport { createRoot } from 'react-dom/client';\n\nimport { createContext, useContextSelector } from 'use-context-selector';\n\nconst context = createContext(null);\n\nconst Counter1 = () => {\n  const count1 = useContextSelector(context, (v) => v[0].count1);\n  const setState = useContextSelector(context, (v) => v[1]);\n  const increment = () =>\n    setState((s) => ({\n      ...s,\n      count1: s.count1 + 1,\n    }));\n  return (\n    <div>\n      <span>Count1: {count1}</span>\n      <button type=\"button\" onClick={increment}>\n        +1\n      </button>\n      {Math.random()}\n    </div>\n  );\n};\n\nconst Counter2 = () => {\n  const count2 = useContextSelector(context, (v) => v[0].count2);\n  const setState = useContextSelector(context, (v) => v[1]);\n  const increment = () =>\n    setState((s) => ({\n      ...s,\n      count2: s.count2 + 1,\n    }));\n  return (\n    <div>\n      <span>Count2: {count2}</span>\n      <button type=\"button\" onClick={increment}>\n        +1\n      </button>\n      {Math.random()}\n    </div>\n  );\n};\n\nconst StateProvider = ({ children }) => (\n  <context.Provider value={useState({ count1: 0, count2: 0 })}>\n    {children}\n  </context.Provider>\n);\n\nconst App = () => (\n  <StateProvider>\n    <Counter1 />\n    <Counter2 />\n  </StateProvider>\n);\n\ncreateRoot(document.getElementById('app')).render(<App />);\n```\n\n## API\n\n<!-- Generated by documentation.js. Update this documentation by updating the source code. -->\n\n### createContext\n\nThis creates a special context for `useContextSelector`.\n\n#### Parameters\n\n*   `defaultValue` **Value**&#x20;\n\n#### Examples\n\n```javascript\nimport { createContext } from 'use-context-selector';\n\nconst PersonContext = createContext({ firstName: '', familyName: '' });\n```\n\n### useContextSelector\n\nThis hook returns context selected value by selector.\n\nIt will only accept context created by `createContext`.\nIt will trigger re-render if only the selected value is referentially changed.\n\nThe selector should return referentially equal result for same input for better performance.\n\n#### Parameters\n\n*   `context` **Context\\<Value>**&#x20;\n*   `selector` **function (value: Value): Selected**&#x20;\n\n#### Examples\n\n```javascript\nimport { useContextSelector } from 'use-context-selector';\n\nconst firstName = useContextSelector(PersonContext, (state) => state.firstName);\n```\n\n### useContext\n\nThis hook returns the entire context value.\nUse this instead of React.useContext for consistent behavior.\n\n#### Parameters\n\n*   `context` **Context\\<Value>**&#x20;\n\n#### Examples\n\n```javascript\nimport { useContext } from 'use-context-selector';\n\nconst person = useContext(PersonContext);\n```\n\n### useContextUpdate\n\nThis hook returns an update function to wrap an updating function\n\nUse this for a function that will change a value in\nconcurrent rendering in React 18.\nOtherwise, there's no need to use this hook.\n\n#### Parameters\n\n*   `context` **Context\\<Value>**&#x20;\n\n#### Examples\n\n```javascript\nimport { useContextUpdate } from 'use-context-selector';\n\nconst update = useContextUpdate();\n\n// Wrap set state function\nupdate(() => setState(...));\n\n// Experimental suspense mode\nupdate(() => setState(...), { suspense: true });\n```\n\n### BridgeProvider\n\nThis is a Provider component for bridging multiple react roots\n\n#### Parameters\n\n*   `$0` **{context: Context\\<any>, value: any, children: ReactNode}**&#x20;\n\n    *   `$0.context` &#x20;\n    *   `$0.value` &#x20;\n    *   `$0.children` &#x20;\n\n#### Examples\n\n```javascript\nconst valueToBridge = useBridgeValue(PersonContext);\nreturn (\n  <Renderer>\n    <BridgeProvider context={PersonContext} value={valueToBridge}>\n      {children}\n    </BridgeProvider>\n  </Renderer>\n);\n```\n\n### useBridgeValue\n\nThis hook return a value for BridgeProvider\n\n#### Parameters\n\n*   `context` **Context\\<any>**&#x20;\n\n## Limitations\n\n*   In order to stop propagation, `children` of a context provider has to be either created outside of the provider or memoized with `React.memo`.\n*   Provider trigger re-renders only if the context value is referentially changed.\n*   Neither context consumers or class components are supported.\n*   The [stale props](https://react-redux.js.org/api/hooks#stale-props-and-zombie-children) issue can't be solved in userland.\n*   Tearing is only avoided if all consumers get data using `useContextSelector`. If you use both props and `use-context-selector` to pass the same data, they may provide inconsistence data for a brief moment. (`02_tearing_spec` fails)\n\n## Examples\n\nThe [examples](examples) folder contains working examples.\nYou can run one of them with\n\n```bash\nPORT=8080 yarn run examples:01_counter\n```\n\nand open <http://localhost:8080> in your web browser.\n\nYou can also try them in codesandbox.io:\n[01](https://codesandbox.io/s/github/dai-shi/use-context-selector/tree/main/examples/01_counter)\n[02](https://codesandbox.io/s/github/dai-shi/use-context-selector/tree/main/examples/02_person)\n[03](https://codesandbox.io/s/github/dai-shi/use-context-selector/tree/main/examples/03_suspense)\n\n## Projects that use use-context-selector\n\n*   [react-tracked](https://github.com/dai-shi/react-tracked)\n*   [use-atom](https://github.com/dai-shi/use-atom)\n*   [react-hooks-fetch](https://github.com/dai-shi/react-hooks-fetch)\n","readmeFilename":"README.md","gitHead":"384bc94e36869c8a90e0ac967add2807db1ea56a","bugs":{"url":"https://github.com/dai-shi/use-context-selector/issues"},"homepage":"https://github.com/dai-shi/use-context-selector#readme","_nodeVersion":"18.20.2","_npmVersion":"10.5.0","dist":{"integrity":"sha512-AODu0x/FzGXTWnVDD/zTSP6JQ3n5LWQm8PKJzrmzX9vQuXuw83Chf1pBYzq9TkCy2Hi1L1b8W02fBBbftKQrIA==","shasum":"c1d307018a3233818dd6af4d3111666638f4205e","tarball":"https://registry.npmjs.org/use-context-selector/-/use-context-selector-2.0.0-beta.0.tgz","fileCount":9,"unpackedSize":43036,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCID475gRqoDFIYyNqSdvsQOLSnHc3DrFhJGjj0duq5F9rAiB8aLBNE5RzP9mRnaKZryvWKi8ynS2RkZ1Aq91TDCZQ7w=="}]},"_npmUser":{"name":"daishi","email":"daishi@axlight.com"},"directories":{},"maintainers":[{"name":"daishi","email":"daishi@axlight.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/use-context-selector_2.0.0-beta.0_1714180764955_0.8679135123996933"},"_hasShrinkwrap":false},"2.0.0":{"name":"use-context-selector","description":"React useContextSelector hook in userland","version":"2.0.0","type":"module","author":{"name":"Daishi Kato"},"repository":{"type":"git","url":"git+https://github.com/dai-shi/use-context-selector.git"},"source":"./src/index.ts","main":"./dist/index.js","types":"./dist/index.d.ts","exports":{"./package.json":"./package.json",".":{"require":{"types":"./dist/cjs/index.d.ts","default":"./dist/cjs/index.js"},"default":{"types":"./dist/index.d.ts","default":"./dist/index.js"}}},"sideEffects":false,"packageManager":"pnpm@8.15.0","scripts":{"compile":"rm -rf dist && pnpm run '/^compile:.*/'","compile:esm":"tsc -p tsconfig.esm.json","compile:cjs":"tsc -p tsconfig.cjs.json && echo '{\"type\":\"commonjs\"}' > dist/cjs/package.json","test":"pnpm run '/^test:.*/'","test:format":"prettier -c .","test:lint":"eslint .","test:types":"tsc -p . --noEmit","test:types:examples":"tsc -p examples --noEmit","test:spec":"vitest run","apidoc":"documentation readme src --section API --markdown-toc false --parse-extension ts","examples:01_counter":"DIR=01_counter vite","examples:02_person":"DIR=02_person vite","examples:03_suspense":"DIR=03_suspense vite"},"keywords":["react","context","hooks"],"license":"MIT","prettier":{"singleQuote":true},"devDependencies":{"@testing-library/jest-dom":"^6.4.2","@testing-library/react":"^15.0.5","@testing-library/user-event":"^14.5.2","@types/node":"^20.12.7","@types/react":"^18.3.1","@types/react-dom":"^18.3.0","@types/scheduler":"^0.23.0","@typescript-eslint/eslint-plugin":"^7.7.1","@typescript-eslint/parser":"^7.7.1","documentation":"^14.0.3","eslint":"^8.57.0","eslint-config-prettier":"^9.1.0","eslint-import-resolver-typescript":"^3.6.1","eslint-plugin-import":"^2.29.1","eslint-plugin-jsx-a11y":"^6.8.0","eslint-plugin-react":"^7.34.1","eslint-plugin-react-hooks":"^4.6.2","happy-dom":"^14.7.1","prettier":"^3.2.5","react":"^18.3.1","react-dom":"^18.3.1","scheduler":"^0.23.2","ts-expect":"^1.3.0","typescript":"^5.4.5","vite":"^5.2.10","vitest":"^1.5.2"},"peerDependencies":{"react":">=18.0.0","scheduler":">=0.19.0"},"_id":"use-context-selector@2.0.0","gitHead":"7166bce56ee137fcccdd9e66c3981d1c13ff520f","bugs":{"url":"https://github.com/dai-shi/use-context-selector/issues"},"homepage":"https://github.com/dai-shi/use-context-selector#readme","_nodeVersion":"18.20.2","_npmVersion":"10.5.0","dist":{"integrity":"sha512-owfuSmUNd3eNp3J9CdDl0kMgfidV+MkDvHPpvthN5ThqM+ibMccNE0k+Iq7TWC6JPFvGZqanqiGCuQx6DyV24g==","shasum":"3b5dafec7aa947c152d4f0aa7f250e99a205df3d","tarball":"https://registry.npmjs.org/use-context-selector/-/use-context-selector-2.0.0.tgz","fileCount":9,"unpackedSize":43149,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIC+pKcoy9D/wZv9mbvLaFP5f2MCkCyyTs78YtG9W5CY3AiBAtappHcIi8n6RA38RGxbnf2IDe3IE95s740Mum2iP1A=="}]},"_npmUser":{"name":"daishi","email":"daishi@axlight.com"},"directories":{},"maintainers":[{"name":"daishi","email":"daishi@axlight.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/use-context-selector_2.0.0_1714994639112_0.5844001364876212"},"_hasShrinkwrap":false}},"time":{"created":"2019-07-05T03:08:30.561Z","0.1.0":"2019-07-05T03:08:30.706Z","modified":"2024-05-06T11:23:59.422Z","0.2.0":"2019-07-06T23:50:02.939Z","0.3.0":"2019-07-20T13:13:17.547Z","0.4.0":"2019-07-23T01:22:24.986Z","1.0.0":"2019-08-02T15:11:14.265Z","1.0.1":"2019-09-27T14:04:38.232Z","1.1.0":"2020-02-24T00:50:55.382Z","1.1.1":"2020-03-02T11:55:48.646Z","2.0.0-alpha.1":"2020-03-12T00:49:02.980Z","2.0.0-alpha.2":"2020-03-24T00:51:29.863Z","2.0.0-alpha.3":"2020-03-24T13:52:44.512Z","2.0.0-alpha.4":"2020-05-31T12:45:20.776Z","1.1.2":"2020-07-02T09:15:03.619Z","2.0.0-alpha.5":"2020-07-02T09:37:31.424Z","2.0.0-alpha.6":"2020-08-03T14:53:48.750Z","2.0.0-alpha.7":"2020-09-17T03:29:04.394Z","1.1.3":"2020-09-17T12:39:48.085Z","1.1.4-beta.1":"2020-09-21T05:38:12.501Z","1.1.4-beta.2":"2020-09-21T06:36:26.800Z","1.1.4":"2020-09-22T13:40:27.532Z","2.0.0-alpha.9":"2020-09-29T12:01:17.457Z","1.2.0":"2020-10-01T12:53:12.221Z","1.2.1":"2020-10-01T13:29:35.210Z","1.2.2":"2020-10-02T12:39:44.341Z","1.2.3":"2020-10-03T08:12:10.004Z","1.2.4":"2020-10-03T12:09:43.374Z","1.2.5":"2020-10-03T13:05:33.355Z","1.2.6":"2020-10-07T22:19:51.345Z","1.2.7":"2020-10-07T22:46:59.668Z","1.2.8":"2020-10-08T09:07:26.186Z","1.2.9":"2020-10-16T12:39:52.128Z","1.2.10":"2020-10-17T10:58:22.910Z","1.2.11":"2020-11-09T11:35:42.638Z","1.2.12":"2020-11-29T00:19:23.769Z","1.3.0":"2020-12-01T12:33:53.534Z","1.3.1":"2020-12-03T10:08:39.128Z","1.3.2":"2020-12-03T10:28:23.650Z","1.3.3":"2020-12-11T14:53:07.478Z","1.3.4":"2020-12-12T02:35:42.563Z","1.3.5":"2021-01-06T12:39:53.163Z","1.3.6":"2021-01-22T17:02:44.717Z","1.3.7":"2021-01-24T13:56:25.727Z","1.3.8":"2021-09-18T03:01:58.581Z","1.3.9":"2021-09-20T10:32:17.772Z","1.3.10":"2022-04-12T00:31:29.983Z","1.4.0":"2022-05-17T00:59:05.886Z","1.4.1":"2022-06-07T23:18:24.216Z","1.4.2":"2024-03-02T00:22:45.193Z","1.4.3":"2024-03-06T01:49:59.686Z","1.4.4":"2024-03-08T13:35:38.469Z","2.0.0-beta.0":"2024-04-27T01:19:25.327Z","2.0.0":"2024-05-06T11:23:59.259Z"},"maintainers":[{"name":"daishi","email":"daishi@axlight.com"}],"description":"React useContextSelector hook in userland","homepage":"https://github.com/dai-shi/use-context-selector#readme","keywords":["react","context","hooks"],"repository":{"type":"git","url":"git+https://github.com/dai-shi/use-context-selector.git"},"author":{"name":"Daishi Kato"},"bugs":{"url":"https://github.com/dai-shi/use-context-selector/issues"},"license":"MIT","readme":"# use-context-selector\n\n[![CI](https://img.shields.io/github/actions/workflow/status/dai-shi/use-context-selector/ci.yml?branch=main)](https://github.com/dai-shi/use-context-selector/actions?query=workflow%3ACI)\n[![npm](https://img.shields.io/npm/v/use-context-selector)](https://www.npmjs.com/package/use-context-selector)\n[![size](https://img.shields.io/bundlephobia/minzip/use-context-selector)](https://bundlephobia.com/result?p=use-context-selector)\n[![discord](https://img.shields.io/discord/627656437971288081)](https://discord.gg/MrQdmzd)\n\nReact useContextSelector hook in userland\n\n## Introduction\n\nReact Context and useContext is often used to avoid prop drilling,\nhowever it's known that there's a performance issue.\nWhen a context value is changed, all components that useContext\nwill re-render.\n\nTo solve this issue,\n[useContextSelector](https://github.com/reactjs/rfcs/pull/119)\nis proposed and later proposed\n[Speculative Mode](https://github.com/reactjs/rfcs/pull/150)\nwith context selector support.\nThis library provides the API in userland.\n\nPrior to v1.3, it uses `changedBits=0` feature to stop propagation,\nv1.3 no longer depends on this undocumented feature.\n\n## Install\n\nThis package requires some peer dependencies, which you need to install by yourself.\n\n```bash\nnpm install use-context-selector react scheduler\n```\n\nNotes for library authors:\n\nPlease do not forget to keep `\"peerDependencies\"` and\nnote instructions to let users to install peer dependencies.\n\n## Technical memo\n\nTo make it work like original React context, it uses\n[useReducer cheat mode](https://overreacted.io/a-complete-guide-to-useeffect/#why-usereducer-is-the-cheat-mode-of-hooks) intentionally.\n\nIt also requires `useContextUpdate` to behave better in concurrent rendering.\nIts usage is optional and only required if the default behavior is unexpected.\n\nIf you need a simpler solution, you can use `useSyncExternalStore` without any libraries. See [an example](https://github.com/dai-shi/use-context-selector/issues/109#issuecomment-1785147682).\n\n## Usage\n\n```javascript\nimport { useState } from 'react';\nimport { createRoot } from 'react-dom/client';\n\nimport { createContext, useContextSelector } from 'use-context-selector';\n\nconst context = createContext(null);\n\nconst Counter1 = () => {\n  const count1 = useContextSelector(context, (v) => v[0].count1);\n  const setState = useContextSelector(context, (v) => v[1]);\n  const increment = () =>\n    setState((s) => ({\n      ...s,\n      count1: s.count1 + 1,\n    }));\n  return (\n    <div>\n      <span>Count1: {count1}</span>\n      <button type=\"button\" onClick={increment}>\n        +1\n      </button>\n      {Math.random()}\n    </div>\n  );\n};\n\nconst Counter2 = () => {\n  const count2 = useContextSelector(context, (v) => v[0].count2);\n  const setState = useContextSelector(context, (v) => v[1]);\n  const increment = () =>\n    setState((s) => ({\n      ...s,\n      count2: s.count2 + 1,\n    }));\n  return (\n    <div>\n      <span>Count2: {count2}</span>\n      <button type=\"button\" onClick={increment}>\n        +1\n      </button>\n      {Math.random()}\n    </div>\n  );\n};\n\nconst StateProvider = ({ children }) => (\n  <context.Provider value={useState({ count1: 0, count2: 0 })}>\n    {children}\n  </context.Provider>\n);\n\nconst App = () => (\n  <StateProvider>\n    <Counter1 />\n    <Counter2 />\n  </StateProvider>\n);\n\ncreateRoot(document.getElementById('app')).render(<App />);\n```\n\n## API\n\n<!-- Generated by documentation.js. Update this documentation by updating the source code. -->\n\n### createContext\n\nThis creates a special context for `useContextSelector`.\n\n#### Parameters\n\n*   `defaultValue` **Value**&#x20;\n\n#### Examples\n\n```javascript\nimport { createContext } from 'use-context-selector';\n\nconst PersonContext = createContext({ firstName: '', familyName: '' });\n```\n\n### useContextSelector\n\nThis hook returns context selected value by selector.\n\nIt will only accept context created by `createContext`.\nIt will trigger re-render if only the selected value is referentially changed.\n\nThe selector should return referentially equal result for same input for better performance.\n\n#### Parameters\n\n*   `context` **Context\\<Value>**&#x20;\n*   `selector` **function (value: Value): Selected**&#x20;\n\n#### Examples\n\n```javascript\nimport { useContextSelector } from 'use-context-selector';\n\nconst firstName = useContextSelector(PersonContext, (state) => state.firstName);\n```\n\n### useContext\n\nThis hook returns the entire context value.\nUse this instead of React.useContext for consistent behavior.\n\n#### Parameters\n\n*   `context` **Context\\<Value>**&#x20;\n\n#### Examples\n\n```javascript\nimport { useContext } from 'use-context-selector';\n\nconst person = useContext(PersonContext);\n```\n\n### useContextUpdate\n\nThis hook returns an update function to wrap an updating function\n\nUse this for a function that will change a value in\nconcurrent rendering in React 18.\nOtherwise, there's no need to use this hook.\n\n#### Parameters\n\n*   `context` **Context\\<Value>**&#x20;\n\n#### Examples\n\n```javascript\nimport { useContextUpdate } from 'use-context-selector';\n\nconst update = useContextUpdate();\n\n// Wrap set state function\nupdate(() => setState(...));\n\n// Experimental suspense mode\nupdate(() => setState(...), { suspense: true });\n```\n\n### BridgeProvider\n\nThis is a Provider component for bridging multiple react roots\n\n#### Parameters\n\n*   `$0` **{context: Context\\<any>, value: any, children: ReactNode}**&#x20;\n\n    *   `$0.context` &#x20;\n    *   `$0.value` &#x20;\n    *   `$0.children` &#x20;\n\n#### Examples\n\n```javascript\nconst valueToBridge = useBridgeValue(PersonContext);\nreturn (\n  <Renderer>\n    <BridgeProvider context={PersonContext} value={valueToBridge}>\n      {children}\n    </BridgeProvider>\n  </Renderer>\n);\n```\n\n### useBridgeValue\n\nThis hook return a value for BridgeProvider\n\n#### Parameters\n\n*   `context` **Context\\<any>**&#x20;\n\n## Limitations\n\n*   In order to stop propagation, `children` of a context provider has to be either created outside of the provider or memoized with `React.memo`.\n*   Provider trigger re-renders only if the context value is referentially changed.\n*   Neither context consumers or class components are supported.\n*   The [stale props](https://react-redux.js.org/api/hooks#stale-props-and-zombie-children) issue can't be solved in userland.\n*   Tearing is only avoided if all consumers get data using `useContextSelector`. If you use both props and `use-context-selector` to pass the same data, they may provide inconsistence data for a brief moment. (`02_tearing_spec` fails)\n\n## Examples\n\nThe [examples](examples) folder contains working examples.\nYou can run one of them with\n\n```bash\nPORT=8080 yarn run examples:01_counter\n```\n\nand open <http://localhost:8080> in your web browser.\n\nYou can also try them in codesandbox.io:\n[01](https://codesandbox.io/s/github/dai-shi/use-context-selector/tree/main/examples/01_counter)\n[02](https://codesandbox.io/s/github/dai-shi/use-context-selector/tree/main/examples/02_person)\n[03](https://codesandbox.io/s/github/dai-shi/use-context-selector/tree/main/examples/03_suspense)\n\n## Projects that use use-context-selector\n\n*   [react-tracked](https://github.com/dai-shi/react-tracked)\n*   [use-atom](https://github.com/dai-shi/use-atom)\n*   [react-hooks-fetch](https://github.com/dai-shi/react-hooks-fetch)\n","readmeFilename":"README.md"}